cedict-json individual json data of dictionary term according to simplified terms.
- Fork this repository
- Get meaning using cdn for v2 data
https://cdn.jsdelivr.net/gh/<your-username>/cedict-json/v2/我.json
Note: <your-username>
is your GitHub username
- The v2 data
{
"simplified": "我",
"traditional": "我",
"pinyin": [
"wo3"
],
"definitions": {
"wo3": "I; me; my; "
}
}
- Multiple meanings are separated by semi-color
;
. For e.g. three meaning for我
"definitions": {
"wo3": "I; me; my; "
}
Generated using toJson.py script
Some words (approx. 3000) have same character and different pinyin and meaning. So using toJson.py words merged.
For e.g. 的
have more than one pinyin and meaning. But in version 1 there is one pinyin. So use v2 for getting meaning data. Also the multiple meanings are separated by semi-colon ;
for respective pinyin.
{
"simplified": "的",
"traditional": "的",
"pinyin": [
"de5",
"di1",
"di2",
"di4"
],
"definitions": {
"de5": "of; ~'s (possessive particle); (used after an attribute); (used to form a nominal expression); (used at the end of a declarative sentence for emphasis); ",
"di1": "see 的士[di1 shi4]; ",
"di2": "really and truly; ",
"di4": "aim; clear; "
}
}
with open('cedict.json', encoding='utf8') as json_file:
data = json.load(json_file)
for x in range(0, 114852):
print(data[x]['simplified'])
name = data[x]['simplified']
name += '.json'
with open(name, "w", encoding='utf8') as f:
json.dump(data[x],f,indent=4,sort_keys=True, ensure_ascii=False)
https://github.com/kevb34ns/CEDICT2JSON
Example 1
https://cdn.jsdelivr.net/gh/<your-username>/cedict-json/data/我.json
Fork this and then,
your-username is your github username
Fetched data
{
"definitions": [
"I",
"my"
],
"pinyin": "wo3",
"simplified": "我",
"traditional": "我"
}
Example 2
https://cdn.jsdelivr.net/gh/infinyte7/cedict-json/data/知道.json
Fetched data
{
"definitions": [
"to know",
"also pr. [zhi1 dao5]"
],
"pinyin": "zhi1 dao4",
"simplified": "知道",
"traditional": "知道"
}
Simple 中文 Vocabulary Generator
Creative Commons Attribution-Share Alike 4.0 License
https://cc-cedict.org/wiki/
Mani (Infinyte7)
Creative Commons Attribution-Share Alike 4.0 License
hanziconv
googletrans
colorize_pinyin