mirror of
https://github.com/fumiama/jieba.git
synced 2026-07-01 17:40:29 +08:00
allow user to manually set idf file and stop words file, corresponding to jieba commit 16d626d3477c8649d42094d7d7d4ae7c619783de
This commit is contained in:
@@ -38,8 +38,7 @@ func ExtractTags(sentence string, topK int) []string {
|
||||
if utf8.RuneCountInString(w) < 2 {
|
||||
continue
|
||||
}
|
||||
index := stopWords.Search(w)
|
||||
if index < len(stopWords) && stopWords[index] == w {
|
||||
if _, ok := stopWords[w]; ok {
|
||||
continue
|
||||
}
|
||||
if f, ok := freq[w]; ok {
|
||||
|
||||
Reference in New Issue
Block a user