Skip to content

Commit

Permalink
feat: OUTPUT_NO_PINYIN
Browse files Browse the repository at this point in the history
  • Loading branch information
OverflowCat committed Jul 4, 2023
1 parent 242fb0d commit b3cfdb0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "flypy-ext"
version = "0.1.0"
name = "libre-flypy"
authors = ["OverflowCat"]
version = "1.0.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

注意,本项目目前处于早期开发阶段,不保证生成的码表的正确性。

目前表内形码的正确性为 **7877 / 8106 (97.17%)**,全码的正确性为 **7847 / 8106 (96.80%)**
目前表内形码的正确性为 **7877 / 8106 (97.17%)**,全码的正确性为 **7847 / 8106 (96.80%)** 字,输出共计 **52721** 个编码

目前表内形码错误或缺失的字:

Expand Down
4 changes: 3 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ use std::{

use ids::Tree;

const OUTPUT_NO_PINYIN: bool = false;

pub fn parse_file() {
let (mut firsts, mut lasts) = roots::generate();
let mut done: HashMap<char, String> = HashMap::new();
Expand Down Expand Up @@ -84,7 +86,7 @@ pub fn parse_file() {
for x in pinyin {
done_with_pinyin.push((character, format!("{}{}", x.into_xnhe(), code)));
}
} else {
} else if OUTPUT_NO_PINYIN {
// no pinyin data found
done_with_pinyin.push((character, format!("__{}", code)));
continue;
Expand Down

0 comments on commit b3cfdb0

Please sign in to comment.