This article mainly explains how to download and use the Chinese character pinyin data resources that I have organized.
Resource screenshot
Contains: sql, xls, txt, json and other format files.
Chinese characters cover: polyphonic characters and rare characters.
Download link: https://download.csdn.net/download/hj960511/87705416
Instructions
Step 1. Download the resource pack and decompress it
Get the following four files, each file has a different purpose.
Step 2. Use file instructions
Instructions for using the sql file
You can directly run the sql file through the navcat database software
Use of json files
PHP uses the following code to read json data:
// 读取文件内容
$jsonString = file_get_contents('所处路径/文件名.json');
// 转换为对象
$data = json_decode($jsonString);
//打印数据
print_r($data->RECORDS[0]);
actual effect:
Call method under python:
import json
with open('所处路径/文件名.json', 'rb') as f:
data = f.read().decode('utf-8')
obj = json.loads(data)
print(obj['RECORDS'][190])
actual effect:
txt, xls file instructions
As above, it can also be operated by reading the file, or it can be stored in the mysql database for use.
Additional resources:
3500 commonly used characters for a single Chinese character: https://download.csdn.net/download/hj960511/85034461