Python: NLTK几个入门函数

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Python: NLTK几个入门函数相关的知识,希望对你有一定的参考价值。

1.统计词频的concordance() 函数

格式:text.concordance(“the text word”)

例如  :text.concordance(word)

text1.concordance("monstrous")
Displaying 11 of 11 matches:
ong the former , one was of a most monstrous size . ... This came towards us ,
ON OF THE PSALMS . " Touching that monstrous bulk of the whale or ork we have r
ll over with a heathenish array of monstrous clubs and spears . Some were thick
d as you gazed , and wondered what monstrous cannibal and savage could ever hav
that has survived the flood ; most monstrous and most mountainous ! That Himmal
they might scout at Moby Dick as a monstrous fable , or still worse and more de
th of Radney .‘" CHAPTER 55 Of the Monstrous Pictures of Whales . I shall ere l
ing Scenes . In connexion with the monstrous pictures of whales , I am strongly
ere to enter upon those still more monstrous stories of them which are to be fo
ght have been rummaged out of this monstrous cabinet there is no telling . But
of Whale - Bones ; for Whales of a monstrous size are oftentimes cast up dead u
>>>









以上是关于Python: NLTK几个入门函数的主要内容,如果未能解决你的问题,请参考以下文章

python nltk 入门demo

Python自然语言工具包(NLTK)入门

Python NLP入门教程

下载NLP绝佳入门经典图书《NLTK-Python自然语言处理》中英文版, 教程+代码手把手带你实践NLP算法

自然语言工具包入门

NLTK入门