1
0
mirror of https://github.com/fumiama/jieba.git synced 2026-06-12 13:10:25 +08:00

small code refactor

This commit is contained in:
Wang Bin
2015-02-04 14:47:59 +08:00
parent c3dce0d4a1
commit 0f7c56b4ef
5 changed files with 20 additions and 19 deletions

View File

@@ -24,7 +24,7 @@ func Tokenize(sentence string, mode string, HMM bool) []Token {
if width > step {
for i := 0; i < width-step+1; i++ {
gram := string(runes[i : i+step])
if _, ok := trie.Freq[gram]; ok {
if _, ok := T.Freq[gram]; ok {
tokens = append(tokens, Token{gram, start + i, start + i + step})
}
}