A very simple translator based on a word to word dictionary
(Though this project is designed to convert traditional Chinese to simplified, it owns the ability to do more things.)
pip3 install naive_translator
>>> from naive_translator import translator
>>> translation = translator('豐田的上門女婿和女人')
>>> print(translation)
丰田的上门女婿和女人
To start the server, run the following command
naive_translator 8001
Then you could visit
Url | Explanation |
---|---|
http://localhost:8001 | A welcome page |
http://localhost:8001/dicts | List all available dictionaries |
http://localhost:8001/translate?dict=&text= | Translate |
- Dictionary files are placed in
naive_translator/data
directory - Configure file is
naive_translator/config.py