Hi, folks,
I added a new MT Client that can support MT from ColorfulClouds. ColorfulClouds is one of leading MT service provider in China. The attached patch is the changes for cxserver codebase.
As mentioned in https://www.mediawiki.org/wiki/Content_translation/Machine_Translation/MT_Clients , we give our materials as follow to prove that we meet the technical requirements.
Translation API
- If API is not public, it can accept an authentication token, mostly a key
- it is authenticated by key and the key will be sent separately from this ticket
- The output format can be JSON for convenience
- The output format is JSON
- API should accept POST
- API support POST
- API should not demand any user identifiable information such as username. CXServer does not provide it to MT Client
- API does not require user information from Wiki side
- API should be capable of accepting a reasonable number of requests per minute
- see below section on performance
- API should accept a reasonable amount of content per request
- see below section on test
- It is recommended to have a dashboard to analyze the usage of API including requests per day/week/month and Number of characters translated per day/week/month
- we have a private dashboard, but can offer an account to log-in to check
Guidelines for performance
- At least 10,000 requests per day
- At least 10 million characters per day
- At least 5000 characters per request
execute command
ab -n 100 -c 5 -p test-load.txt -T 'application/x-www-form-urlencoded' -H 'Accept: application/json; charset=utf-8' http://127.0.0.1:8080/v1/mt/en/zh/ColorfulClouds
and the result is
This is ApacheBench, Version 2.3 <$Revision: 1807734 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking 127.0.0.1 (be patient).....done Server Software: Server Hostname: 127.0.0.1 Server Port: 8080 Document Path: /v1/mt/en/zh/ColorfulClouds Document Length: 5760 bytes Concurrency Level: 5 Time taken for tests: 3.221 seconds Complete requests: 100 Failed requests: 0 Total transferred: 654200 bytes Total body sent: 1088100 HTML transferred: 576000 bytes Requests per second: 31.05 [#/sec] (mean) Time per request: 161.046 [ms] (mean) Time per request: 32.209 [ms] (mean, across all concurrent requests) Transfer rate: 198.35 [Kbytes/sec] received 329.90 kb/s sent 528.25 kb/s total Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.0 0 0 Processing: 127 158 23.7 149 263 Waiting: 126 158 23.7 149 263 Total: 127 158 23.7 149 263 Percentage of the requests served within a certain time (ms) 50% 149 66% 164 75% 172 80% 175 90% 184 95% 213 98% 242 99% 263 100% 263 (longest request)
Input format
- we translate the plain text version of the content.
Quality of translation
An example from https://www.nobelprize.org/nobel_prizes/literature/laureates/2017/bio-bibl.html
The attached patch
The attached test-load.txt