mirror of
https://github.com/fumiama/jieba.git
synced 2026-06-09 02:50:24 +08:00
refactor Cut function, make CutAll a seperate function, to simplify the logic of Cut function
This commit is contained in:
@@ -35,7 +35,7 @@ func (jt *JiebaTokenizer) Tokenize(input []byte) analysis.TokenStream {
|
||||
pos := 1
|
||||
var width int
|
||||
var gram string
|
||||
for word := range jt.j.Cut(string(input), false, jt.hmm) {
|
||||
for word := range jt.j.Cut(string(input), jt.hmm) {
|
||||
if jt.searchMode {
|
||||
runes := []rune(word)
|
||||
width = len(runes)
|
||||
|
||||
Reference in New Issue
Block a user