1
0
mirror of https://github.com/fumiama/jieba.git synced 2026-06-05 00:32:51 +08:00

fixed the tests failure issue

This commit is contained in:
Wang Bin
2015-02-26 10:14:35 +08:00
parent 67216a8a7d
commit c076a14f76

View File

@@ -144,7 +144,7 @@ func cut_DAG(sentence string) []WordTag {
buf = make([]rune, 0)
} else {
bufString := string(buf)
if _, ok := jiebago.T.Freq[bufString]; !ok {
if v, ok := jiebago.T.Freq[bufString]; !ok || v == 0.0 {
recognized := cutDetail(bufString)
for _, t := range recognized {
result = append(result, t)
@@ -183,7 +183,7 @@ func cut_DAG(sentence string) []WordTag {
}
} else {
bufString := string(buf)
if _, ok := jiebago.T.Freq[bufString]; !ok {
if v, ok := jiebago.T.Freq[bufString]; !ok || v == 0.0 {
recognized := cutDetail(bufString)
for _, t := range recognized {
result = append(result, t)