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:
@@ -144,7 +144,7 @@ func cut_DAG(sentence string) []WordTag {
|
|||||||
buf = make([]rune, 0)
|
buf = make([]rune, 0)
|
||||||
} else {
|
} else {
|
||||||
bufString := string(buf)
|
bufString := string(buf)
|
||||||
if _, ok := jiebago.T.Freq[bufString]; !ok {
|
if v, ok := jiebago.T.Freq[bufString]; !ok || v == 0.0 {
|
||||||
recognized := cutDetail(bufString)
|
recognized := cutDetail(bufString)
|
||||||
for _, t := range recognized {
|
for _, t := range recognized {
|
||||||
result = append(result, t)
|
result = append(result, t)
|
||||||
@@ -183,7 +183,7 @@ func cut_DAG(sentence string) []WordTag {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
bufString := string(buf)
|
bufString := string(buf)
|
||||||
if _, ok := jiebago.T.Freq[bufString]; !ok {
|
if v, ok := jiebago.T.Freq[bufString]; !ok || v == 0.0 {
|
||||||
recognized := cutDetail(bufString)
|
recognized := cutDetail(bufString)
|
||||||
for _, t := range recognized {
|
for _, t := range recognized {
|
||||||
result = append(result, t)
|
result = append(result, t)
|
||||||
|
|||||||
Reference in New Issue
Block a user