Input format: Input files must be in .txt FORMAT with UTF-8 ENCODING and contain PORTUGUESE TEXT or CHINESE TEXT. Input files and folders can also be compressed to the .zip format.
Privacy: The input file you upload and the respective output files will be automatically deleted from our computer after being processed and the result downloaded by you. No copies of your files will be retained after your use of this service.
The size of your input file is large and its processing may take some time.
To receive by email the url link from which to download your processed file when ready,
enter your email address below. After being used for this purpose, your email address
will be deleted from our computer.
Instructions to use this web service
The web service for this application is available at https://portulanclarin.net/workbench/lx-translator/api/.
Below you find an example of how to use this web service with Python 3.
This example resorts to the requests package. To install this package, run this command in the command line:
pip3 install requests.
To use this web service, you need an access key you can obtain by clicking in the button below.
A key is valid for 31 days. It allows to submit a total of 5 million
characters by means of requests with no more 2000 characters each. It allows to
enter 100,000 requests, at a rate of no more than 200
requests per hour.
For other usage regimes, you should contact the helpdesk.
The input data and the respective output will be automatically deleted from our computer after being processed.
No copies will be retained after your use of this service.
importjsonimportrequests# to install this library, enter in your command line:# pip3 install requests# This is a simple example to illustrate how you can use the LX-Translator web service# Requires: key is a string with your access key# Requires: text is a string, UTF-8, with a maximum 2000 characters, Portuguese text, with# the input to be processed# Requires: source is a string specifying the source language, which can be either 'zh' or 'pt'# Requires: target is a string specifying the target language, which can be either 'zh' or 'pt'# and must be different than source.# Ensures: output according to specification in https://portulanclarin.net/workbench/lx-translator/# Ensures: dict with number of requests and characters input so far with the access key, and# its date of expirykey='access_key_goes_here'# before you run this example, replace access_key_goes_here by# your access keysource='pt'target='zh'text='''A nossa reunião está marcada.'''# this string can be replaced by your input# To read input text from a file, uncomment this block#inputFile = open("myInputFileName", "r", encoding="utf-8") # replace myInputFileName by# the name of your file#text = inputFile.read()#inputFile.close()# Processing:url="https://portulanclarin.net/workbench/lx-translator/api/"request_data={'method':'translate','jsonrpc':'2.0','id':0,'params':{'text':text,'source':source,'target':target,'key':key,},}request=requests.post(url,json=request_data)response_data=request.json()if"error"inresponse_data:print("Error:",response_data["error"])else:print("Result:")print(response_data["result"])# To write output in a file, uncomment this block#outputFile = open("myOutputFileName","w", encoding="utf-8") # replace myOutputFileName by# the name of your file#output = response_data["result"]#outputFile.write(output)#outputFile.close()# Getting acess key status:request_data={'method':'key_status','jsonrpc':'2.0','id':0,'params':{'key':key,},}request=requests.post(url,json=request_data)response_data=request.json()if"error"inresponse_data:print("Error:",response_data["error"])else:print("Key status:")print(json.dumps(response_data["result"],indent=4))
Access key for the web service
This is your access key for this web service.
The following access key for this web service is already associated with .
This key is valid until and can be used to process requests or characters.
Make sure to save this key before closing this dialog box.
Intrinsic evaluation of the model for the directions Portuguese to Chinese
and Chinese to Portuguese has BLEU scores of 13.98 and 16.22, respectively,
on the first 1000 sentences of the NewsCommentaryV11 Corpus.
The development of LX-Translator was supported by POR Lisboa, under the
contract Portugal2020/FEDER/3279 for the project ASSET, and by the exchange
project CNPTDeepMT-Chinese/Portuguese Deep Machine Translation in eCommerce
Domain, supported by MOST-Chinese Ministry of Science and Technology and by
FCT-Portuguese Foundation of Science and Technology.
Publications
Irrespective of the most recent version of this tool you may use,
when mentioning it, please cite this reference:
Contact us using the following email address: 'nlx' concatenated with 'at'
concatenated with 'di.fc.ul.pt'
Why LX-Translator?
LX because LX is the "code" name Lisboners like to use to refer to their
hometown.
License
No fee, attribution, all rights reserved, no redistribution, non commercial, no
warranty, no liability, no endorsement, temporary, non exclusive, share alike.