Update jieba-rs to 0.10.1

This commit is contained in:
2026-06-02 23:47:25 +08:00
parent 10ba569236
commit 5d3f19340e
3 changed files with 10 additions and 9 deletions

View File

@@ -91,7 +91,7 @@ fn check_chinese_word_is_break(segs: &[&str], pos: usize, jieba: &Jieba) -> bool
let mut breaked = jieba
.cut(&s, false)
.iter()
.map(|s| s.graphemes(true).count())
.map(|s| s.word.graphemes(true).count())
.collect::<Vec<_>>();
let mut sum = 0;
for i in breaked.iter_mut() {
@@ -483,7 +483,7 @@ impl FixedFormatter {
let mut breaked = jieba
.cut(&s, false)
.iter()
.map(|s| s.graphemes(true).count())
.map(|s| s.word.graphemes(true).count())
.collect::<Vec<_>>();
let mut sum = 0;
for i in breaked.iter_mut() {