mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
add SetQuerySegmentThreshold in Jieba
This commit is contained in:
parent
c3fd357a6d
commit
8fe4de404e
@ -3,7 +3,8 @@
|
||||
## next version
|
||||
|
||||
1. QuerySegment切词时加一层判断,当长词满足IsAllAscii(比如英文单词)时,不进行细粒度分词。
|
||||
2. QuerySegment新增SetMaxWordLen和GetMaxWordLen接口。
|
||||
2. QuerySegment新增SetMaxWordLen和GetMaxWordLen接口,用来设置二次分词条件被触发的词长阈值。
|
||||
3. Jieba新增SetQuerySegmentThreshold设置CutForSearch函数的词长阈值。
|
||||
|
||||
## v4.0.0
|
||||
|
||||
|
@ -54,6 +54,9 @@ class Jieba {
|
||||
return &model_;
|
||||
}
|
||||
|
||||
void SetQuerySegmentThreshold(size_t len) {
|
||||
query_seg_.SetMaxWordLen(len);
|
||||
}
|
||||
private:
|
||||
DictTrie dict_trie_;
|
||||
HMMModel model_;
|
||||
|
Loading…
x
Reference in New Issue
Block a user