Metadata-Version: 2.1
Name: naive-translator
Version: 0.0.1
Summary: A naive word by word translator
Home-page: https://github.com/ZhenningLang/naive_translator
Author: langzhenning
Author-email: zhenninglang@163.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.2
Description-Content-Type: text/markdown
Requires-Dist: tornado

# 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.)

[Chinese Doc](docs/README_CH.md)

## 1. How to Use

### 1.1 Installation

```bash
pip3 install naive_translator
```

### 1.2 Use as a package

```text
>>> from naive_translator import translator
>>> translation = translator('豐田的上門女婿和女人')
>>> print(translation)
丰田的上门女婿和女人
```

### 1.3 Use as a server

To start the server, run the following command

```bash
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`


