可以使用以下代码解决该问题:
import blingfire
# 将单词转换为小写形式,避免分词时无法识别边界
text = "BlingFire tokenization does not recognize lower case word as a boundary?"
text = text.lower()
# 使用 BlingFire 分词
tokens = blingfire.text_to_words(text)
print(tokens)
这里我们将原文本中的单词全部转换为小写形式,这样在使用 BlingFire 分词时就可以正确识别边界了。
上一篇:bl和数据仓库的关系