赞
踩
在我们离线安装NLTK后,在进行分词操作时,采用如下代码:
import nltk
nltk.download('punkt')
from nltk.tokenize import word_tokenize
text = "I like to go hiking on the weekends."
tokens = word_tokenize(text)
print(tokens
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。