A naive word by word translator
Project description
naive_translator
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.)
1. How to Use
1.1 Installation
pip3 install naive_translator
1.2 Use as a package
>>> from naive_translator import translator
>>> translation = translator('豐田的上門女婿和女人')
>>> print(translation)
丰田的上门女婿和女人
1.3 Use as a server
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 |
Others
- Dictionary files are placed in
naive_translator/data
directory - Configure file is
naive_translator/config.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
naive_translator-0.0.1.tar.gz
(36.5 kB
view hashes)
Built Distribution
Close
Hashes for naive_translator-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c1835ee1592cf53d40c99e06d0d350ed9d4c0dc50af4568730e89420cd5b605 |
|
MD5 | 52ab3206d82a09c98260323a474df3b5 |
|
BLAKE2b-256 | cd3611cb6e45a26bc77ef128b8877cb13b873fbfeeef76c1f46d69a5af4aa218 |