如何解决使用NLTK标记数据框
我试图标记化数据框中列的文本输入,但是我不确定所使用的函数的输入参数应该是什么。功能参数和说明如下:
def Tokenize(text,nwords):
"""
Given list of text to be processed and a list
of kNown words,return a list of edited and
tokenized words.
Spell-checking is implemented using a
Bayesian spell-checking algorithm
(http://norvig.com/spell-correct.html).
By default,this is based on the Project Gutenberg
corpus,a collection of approximately 1 million texts
(http://www.gutenberg.org). A copy of this is included
within this package. If desired,users may specify a
different spell-check training corpus in the
`training_dictionary` argument of the
`prepare_transcripts()` function.
我应该将数据框中的列转换为列表,然后尝试将其作为文本输入吗?但是nwords
参数呢?该功能需要什么样的输入?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。