waltsmith88 / go-flashtext

Go-flashtext is a flashtext implement written in Go (Golang). It is based on the FlashText algorithm.
https://arxiv.org/abs/1711.00046
MIT License
18 stars 6 forks source link

发现bug, 在ExtractKeywordsWithSpanInfo #3

Open mosu027 opened 3 years ago

mosu027 commented 3 years ago

if cleanNameTmp, err := tmpCurrent[__key__]; err { cleanName = cleanNameTmp.(string) } currentDict = tmpCurrent continue

应改为

` if cleanNameTmp, err := tmpCurrent[key]; err { cleanName = cleanNameTmp.(string) } currentDict = tmpCurrent

  if idx < sentenceLen {
                  continue
              }

` 麻烦帮忙确认下