11.7K ·GitHub
What is this?
A Chinese Xinhua Dictionary database (中华新华字典数据库): four JSON datasets with 31,648 idioms, 264,434 words, 16,142 characters and 14,032 xiehouyu (two-part allegorical sayings), collected from the web.
So is this an app I install, or just data files?
Just data files, not an app: idiom.json, ci.json, word.json and xiehouyu.json sit in the repo, ready to load into your own program. The Python scraper scripts that built them are included too.
How do I get the data into my project?
Clone or download the repo and read whichever JSON file you need with any JSON parser — e.g. json.load() in Python. There is nothing to install or run.
Do I need Python to use it?
No — Python applies only to the scraper scripts. The data itself is plain JSON, so any language with a JSON library works.
Is there an API I can just call?
No — the API feature was taken offline in December 2018, so the JSON files in this repo are the only way to use the data.
Where does the data come from?
The author scraped and compiled it from various websites; all the scraping scripts are in the repo, so you can regenerate or refresh the datasets yourself.
Is the data raw or cleaned up?
It is maintained: the changelog in the README records updates, including a December 2018 pass that deduplicated the idiom dataset.
Why did the author build this?
He wanted to make an idiom solitaire (成语接龙) game but no ready-to-use dictionary database existed, so he scraped one together and shared it to spare others the tedious work.
What are similar projects?
chinese-poetry, lieflat-less-ai-tone, Chinese-Word-Vectors, english-words, chinese-copywriting-guidelines, LxgwWenKai, hanji, akshare
Which topics is it in?
chinese-simplified, chinese-nlp, chinese-traditional, dictionary, data, scraper, python3, chinese-language, natural-language-processing, dataset, web-scraping, json