Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/krmanik/chinese-example-sentences
63k Chinese sentences with simplified, traditional, pinyin and english translation for offline use
https://github.com/krmanik/chinese-example-sentences
chinese pinyin sentence simplified-chinese traditional-chinese tsv
Last synced: about 2 months ago
JSON representation
63k Chinese sentences with simplified, traditional, pinyin and english translation for offline use
- Host: GitHub
- URL: https://github.com/krmanik/chinese-example-sentences
- Owner: krmanik
- Created: 2021-02-24T17:04:40.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-17T17:07:46.000Z (almost 4 years ago)
- Last Synced: 2024-10-03T18:54:17.043Z (3 months ago)
- Topics: chinese, pinyin, sentence, simplified-chinese, traditional-chinese, tsv
- Language: Python
- Homepage:
- Size: 8.55 MB
- Stars: 11
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Chinese-Example-Sentences
Chinese sentences with simplified, traditional, pinyin and english translation for offline use in app.
Sentences data taken from [Tatoeba](https://tatoeba.org/eng/downloads), pinyin and traditional characters generated using python module ```pinyin_jyutping_sentence``` and ```hanziconv```. Translation generated using Google sheets.Total 63352 sentences in db and tsv file.
## Downloads
### TSV file
This is tab separated file.
- [Chinese Sentences with pinyin and translation](Chinese%20Example%20Sentences/cmn_sen_db_2.tsv)| id | Simplified | Traditional | Pinyin | English |
```
10 我不知道。 我不知道。 wǒ bù zhīdào 。 I do not know.
```### sqlite .db file
- [sen_data.db](Chinese%20Example%20Sentences/sen_data.db)The [sen_data.db](Chinese%20Example%20Sentences/sen_data.db) contains table ```examples``` with ```id, simplified, traditional, pinyin, english```.
## Usage
Get two random sentences with pinyin, traditional characters and translation
View [read_2_random_sen.py](Chinese%20Example%20Sentences/read_2_random_sen.py)## Create
1. Download sentences database from [Tatoeba](https://tatoeba.org/eng/downloads)
2. Use Google translate to translate the sentences
3. Use Python module ```pinyin_jyutping_sentence``` and ```hanziconv``` to generate pinyin and traditional characters for sentences
4. Use [gen_sen.py](Chinese%20Example%20Sentences/gen_sen.py) and write data to ```.tsv``` file
5. Use [tsv_to_db.py](Chinese%20Example%20Sentences/tsv_to_db.py) python code to create databases.## View this to create tsv and db files with translation for other language
[Simple 中文](https://simplezhongwen.blogspot.com/2021/03/create-language-database-with.html)