The sorted Chinese characters, pinyin, and coded data files are classified according to the initial consonants of pinyin, totaling more than 20,000 items

This article mainly explains how to download and use the Chinese character pinyin data resources that I have organized.

Resource screenshot

insert image description here

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

insert image description here
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
insert image description here

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:
insert image description here

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:
insert image description here

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

Guess you like

Origin blog.csdn.net/hj960511/article/details/130247710