From 606ab2bb11cfafbfad14ed65686d9326fdb780ff Mon Sep 17 00:00:00 2001 From: Koichi Akabe Date: Wed, 6 Sep 2023 11:13:43 +0900 Subject: [PATCH] fix --- docs/benchmark.md | 7 ------- map/src/main.rs | 3 --- 2 files changed, 10 deletions(-) diff --git a/docs/benchmark.md b/docs/benchmark.md index 13a74cb..295ad72 100644 --- a/docs/benchmark.md +++ b/docs/benchmark.md @@ -6,10 +6,3 @@ and sentences in `test.txt` with the following command. ``` $ cargo run --release -p benchmark -- -i system.dic.zst < test.txt ``` - -If you can guarantee that `system.dic.zst` is exported from this library, -you can specify `--features=unchecked` for faster tokenization. - -``` -$ cargo run --release -p benchmark --features=unchecked -- -i system.dic.zst < test.txt -``` diff --git a/map/src/main.rs b/map/src/main.rs index 8acc968..36ea3c5 100644 --- a/map/src/main.rs +++ b/map/src/main.rs @@ -32,10 +32,7 @@ fn main() -> Result<(), Box> { eprintln!("Loading the dictionary..."); let reader = zstd::Decoder::new(File::open(args.sysdic_in)?)?; - #[cfg(not(feature = "unchecked"))] let dict = Dictionary::read(reader)?; - #[cfg(feature = "unchecked")] - let dict = unsafe { Dictionary::read_unchecked(reader)? }; eprintln!("Loading and doing the mapping..."); let lmap = {