nltk分词
1.安装nltk
2.运行如下
SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。>>>import nltk
>>> nltk.download('punkt')
3.代码:
import nltk sentence= """At eight o'clock on Thursday morning ... Arthur didn't feel very good.""" tokens = nltk.word_tokenize(sentence) print(tokens)
4.结果

更多精彩