China Xinhua dictionary database and API. It contains 14,032 xiehouyu, 16,142 Chinese characters, 264,434 words and 31,648 idioms.

If you don’t need performance, you can use my Xinhua Dictionary API. All data is stored in the data/ directory.

Project Structure

Chinese - xinhua / | + -. Vscode / | | | + - launch. Json < - vscode configuration file | + - data / < - data folder | | | + - idiom. Json < idiom - | | | + - word. Json < -- -- Chinese | | | + - xiehouyu. Json < - xiehouyu | | | + - ci. Json < - words | | | + - ci. CSV < - words (CSV) | + - scripts / < - script folder | | | + - addAbbreviation. Py < - add the acronym script to idioms | | | + - chengyu. Py < idiom - download script | | | + - word. Py < - download script Chinese characters | | Xiehouyu | + - xiehouyu. Py < -- -- download script | | | + - ci. Py < - download the scriptCopy the code

Database Introduction

Idioms, idiom. Json)

[" Derivation "comes from the Derivation of Dharma Chinese Sutras and virtues of dharma masters and descends into the Dilemma of Abi. However, a small number of weak-willed ones are gradually tricked into it and eventually fall into the dilemma. "Pinyin" is the Sanskrit of the United Kingdom, meaning without interruption in pain. It is often used as a metaphor for the darkness of society and the harshness of imprisonment, and also for the great anguish from which we cannot escape." "abdy" }, ... ]Copy the code

Words (ci. Json)

[{" ci ", "Chen lun" and "explanation" : "1. The monarch's letters, order."},...Copy the code

Chinese characters (word. Json)

[{" word ":" ah, "" oldword" : "ah," "strokes" : "13", "pinyin" : "a" and "radicals" : "mouth", and "explanation" : Is there no local official here?-- Song, unknown "A New history of the Five Dynasties pinghua"; nga interjection. At the beginning of the sentence, "what is this?"; "what are you trying to do?"; \n\n sha \n hoarky after a whisper \n\n sha \n after a whisper \n\n sha \n ca 1. "Ga ga, a radical radical strokes 03 total stroke 13 ah 2 \ nsha \ n < form > \ n \ n (1) the/hoarse voice hoarse \ n Ai ah not cry all day long. "Laozi" \n(2)\n hoarse/nsha \n < sigh > \n(1)\n what [what]-- meaning negative \ N I'm going to take a bath and see how you can cure me. -- Qing · Pu Songling "A Collection of Liaozhai Pop Songs" \n(2)\n The old servants to master, subordinate to superior "bring in". Soldiers on both sides should shout "yar", before pushing Niugao in front. [ah] [ha] [ha] [ha] [ha] [ha] [ha] [ha] [ha] [ha] [HA] [HA] [HA] [HA] [HA] [HA] [HA] [HA] [HA] [HA] [HA] \n Zhengcode Janr, U55C4, GBKE0c4 \n Stroke number 13, radical, stroke sequence no. 2511325111354\ nga 2\ na Yak 2\n Tong ah 2 ". \n c, U55c4, GBke0c4 \n stroke count 13, Radical, stroke sequence number 2511325111354"},...]Copy the code

Words (ci. Json)

Copy the code

Xiehouyu.json

[{" Riddle ": "Plane Chat "," Answer ": "Riddle"},...]Copy the code

API interface

Both GET and POST are available. Use GET as an example, and POST as an example. Return data in JSON format.

The idiom

Example 1 (direct request idiom)

You need two parameters

  • type=idiomThis idiom means to ask for something
  • Word = high spiritsAn idiom used to express a request
https://www.pwxcoo.com/dictionary?type=idiom&word= in high spiritsCopy the code

The sample a

Example 2 (Request pinyin acronym) :

You need two parameters

  • type=idiomThis idiom means to ask for something
  • word=xgclA pinyin acronym for an idiom that means to request
https://www.pwxcoo.com/dictionary?type=idiom&abbreviation=xgcl   
Copy the code

Example 2

xiehouyu

Example 1 (request Xiehou) :

You need two parameters

  • type=xiehouyuNeed to request xiehouyu
  • Embry-riddleaeronautical = whileThe allegorical face of a request. Fuzzy matching
https://www.pwxcoo.com/dictionary?type=xiehouyu&riddle= claimsCopy the code

The sample a

Chinese characters

Example 1 (Direct request for Chinese characters) :

You need two parameters

  • type=wordIndicates the need to request Chinese characters
  • The word = wuChinese character for request
https://www.pwxcoo.com/dictionary?type=word&word= wuCopy the code

The sample a

Copyright Notice

I got all the data from the Internet. The original purpose of the warehouse is because I want to do the thing of an idiom before, but suffer from the database that does not have ready made and available, oneself crawled to arrange a from each website. Put it on Github for your own convenience, and to make it easier for others with similar needs not to have to do trival’s work. All scripts for fetching data are in the warehouse.

This warehouse has no commercial purpose! If there is infringement, please contact me! Please don’t take me away!