Skip to content
/ TAAS Public

"Translation as a service" - Using Google Translate as easy as a HTTP API

License

Notifications You must be signed in to change notification settings

DPSTeam/TAAS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Translate better, together.

Translation as a service - 翻译即服务

Do you have mass translation tasks to do? TAAS can helps you with asynchronous translation tasks via the HTTP API.

Usage

  1. Make sure you already installed RabbitMQ and MongoDB on your computer.
  2. Using pip3 install the following packages:
sudo pip3 install googletrans flask pika pymongo
  1. Run TAAS consumer on background.
(python3 consumer.py > /dev/null) &
disown
  1. (If you want) Run TAAS server over HTTP API.
(python3 api.py > /dev/null) &

If all these command execute successfully, you will see HTTP API over port 5000.

Import/Export translation cache

TaaS allow you import and export translation data from database.

Export translation for backup

  • Execute
python3 exportTranslate.py

After that, you can see your translate database dump at translate_dump.json.

Import translation into database

  • Execute
python3 importTranslate.py <filename>

Dependency

  • googletrans on pypi
  • flask on pypi
  • RabbitMQ
  • MongoDB

Author

"王万霖"[email protected]

License

See License.

About

"Translation as a service" - Using Google Translate as easy as a HTTP API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages