From c076a14f768342fd0e58304dee577f0c7c756781 Mon Sep 17 00:00:00 2001 From: Wang Bin Date: Thu, 26 Feb 2015 10:14:35 +0800 Subject: [PATCH] fixed the tests failure issue --- posseg/posseg.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/posseg/posseg.go b/posseg/posseg.go index 8f11f49..105db2b 100644 --- a/posseg/posseg.go +++ b/posseg/posseg.go @@ -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)