Wason Language Translator CLI
Using text translation is a common situation in daily life, such as Google Translate、DeepL Translate, Wason Language Translator and other frequently used services.
All of the above services basically support the translation of documents (docx, pptx, pdf, etc.), but the difference is the cost and accuracy of translation.
- Cloud Translation | Google Cloud: Google Cloud Translator provides full document translation, the overall translation effect is better, but there is no free quota, you need to bind a settlement account to use.
- Wason Language Translator Demo: IBM Cloud also provides file translation. After applying for an account, there is a free plan of 2 MB per file. The overall translation effect is worse than Google Cloud Translate.
This article basically encapsulates Language Translator - IBM Cloud API Docs into cli to facilitate file translation
Wason Language Translator Lite Plan
Language Translator - IBM Cloud(https://cloud.ibm.com/apidocs/language-translator) The Lite plan gets you started with 1,000,000 characters per month at no cost and includes the default translation models. When you upgrade to a paid plan, you can create custom models.
Usage
Visit 👉 releases to download latest binary file
Visit 👉 Language Translator - IBM Cloud apply an IBM Cloud account, create Language Translator instance. copy
apiKey
及url
1 2 3 4 5 6 7
API_KEY=<replace-your-api-key> URL=<replace-url> cat <<EOF >> $HOME/.wason-translator-cli.yaml api_key: ${API_KEY} url: ${URL} version: 2018-05-01 EOF
Translat document by cli and the supported formats are
.doc
,.docx
,.ppt
,.pptx
,.xls
,.xlsx
,.rtf
,.odt
,.odp
,.ods
,.pdf
,.htm
,.html
,.xml
,.json
,.txt
Upload document to translate
download translted docuemt file
delete translted docuemt file
Source Code
cage1016/wason-translator-cli: IBM Cloud Language Translator CLI (document translate)