messense / jieba-rs

The Jieba Chinese Word Segmentation Implemented in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Edge case: "test-1"

BlackGlory opened this issue · comments

When I tried to cut test-1, the result was wrong.

let words = jieba.cut_for_search("test-1", true);
assert_eq!(words, vec!["test", "-", "1"]);

// panicked at 'assertion failed: `(left == right)
// left: `["test-1"]`,
// right: `["test", "-", "1"]`'

This seems to be related to 7a520c1