附原文链接:http://t.csdnimg.cn/wVLib
-
import hanlp
-
tokenizer = hanlp.utils.rules.tokenize_english
-
tokenizer('Mr. Hankcs bought hankcs.com for 1.5 thousand dollars.')
-
改为:
-
from hanlp.utils.lang.en.english_tokenizer import tokenize_english
tokenizer = tokenize_english
tokenizer('Mr. Hankcs bought hankcs.com for 1.5 thousand dollars.')
Python 版本为 3.8.10