Skip to content

sotch-pr35mac/syng-dictionary-creator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Syng | 词应 Dictionary Creator

Create a dictionary file for Syng | 词应 Chinese-English Dictionary

About

This project takes a CC-CEDICT file and generates a series of .dictionary files to be used in conjunction with Syng Dictionary.

Result

The resulting .dictionary files will have the words from the CC-CEDICT file in the following format:

struct MeasureWord {
        traditional: String,
        simplified: String,
        pinyin_marks: String,
        pinyin_numbers: String
}

struct WordEntry {
        traditional: String,
        simplified: String,
        pinyin_marks: String,
        pinyin_numbers: String,
        english: Vec<String>,
        tone_marks: Vec<u8>,
        hash: u64,
        measure_words: Vec<MeasureWord>,
        hsk: u8,
        word_id: u32
}

struct SyngDictionary {
        pinyin: HashMap<String, Vec<u32>>,
        english: HashMap<String, Vec<u32>>,
        simplified: HashMap<String, Vec<u32>>,
        traditional: HashMap<String, Vec<u32>>,
        data: HashMap<u32, WordEntry>
}

Usage

  1. Run cargo run
  2. Take the resulting .dictionary files and move them into the the chinese_dictionary project.

License

This software is licensed under the GNU Public License v3. The CC-CEDICT and resulting .dictionary files are licensed under the Creative Commons Attribution-Share Alike 4.0 License.

About

Create a dictionary file for Syng 词应

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages