Syng | 词应 Dictionary Creator
Syng | 词应 Chinese-English Dictionary
Create a dictionary file forAbout
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
- Run
cargo run
- 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.