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/datadirectory - Configure file is
naive_translator/config.py
Release files for naive-translator 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| naive_translator-0.0.1.tar.gz | 36.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| naive_translator-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 73.5 kB
Release files / naive_translator-0.0.1.tar.gz
| Download URL | naive_translator-0.0.1.tar.gz |
|---|---|
| Size | 36.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6e7025ed38a0babf311c787721ba546790f975e7352821780048901167ee910
|
|
BLAKE2b-256 checksum How to use checksums |
edc2c058f9d52336438f8ec71a3fa03f6afb75c0266d706ce72c01ff400e0329
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5
|
Release files / naive_translator-0.0.1-py3-none-any.whl
| Download URL | naive_translator-0.0.1-py3-none-any.whl |
|---|---|
| Size | 37.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6c1835ee1592cf53d40c99e06d0d350ed9d4c0dc50af4568730e89420cd5b605
|
|
BLAKE2b-256 checksum How to use checksums |
cd3611cb6e45a26bc77ef128b8877cb13b873fbfeeef76c1f46d69a5af4aa218
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5
|