![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
NLTK
无知书童
这个作者很懒,什么都没留下…
展开
-
NLTK获取停用词
NLTK获取停用词import nltkfrom nltk.corpus import stopwordsstopset = set(stopwords.words('english')){'here', 'they', 'over', "you'd", 'at', 'more', "doesn't", 'again', 'isn', 'once', 'your', 'their', '...原创 2019-09-01 10:10:43 · 2836 阅读 · 0 评论 -
NLTK FreqDist
FreqDisknltk FreqDisk函数能够统计数组当中单词出现的次数。text = ['hadoop','spark','hive','hadoop','hadoop' ,'spark','lucene','hadoop','spark','hive' ,'hadoop','hadoop','spark','pig','zookeeper' ,'flume','...原创 2019-09-01 10:42:50 · 2379 阅读 · 0 评论 -
NLTK 词干化
NLTK 词干化在NLP中,我们对一句话或一个文档分词之后,一般要进行词干化处理。词干化处理就是把一些名词的复数去掉,动词的不同时态去掉等等类似的处理。对于切词得到的英文单词要进行词干化处理,主要包括将名词的复数变为单数和将动词的其他形态变为基本形态在nltk当中有两种方法做词干化处理:“porter” “snowball”import nltkword_data = "It ori...原创 2019-09-01 11:43:24 · 1318 阅读 · 0 评论