2015-07-20 88 views
2

谁能告诉我一个语料库语料库词汇在NLTK的区别语料库和词库之间的区别?是什么NLTK(蟒蛇)

什么是电影数据集

什么是Wordnet

+0

如果您可以发布单独的问题而不是将问题合并为一个问题,那么这是首选。这样,它可以帮助人们回答你的问题,也可以帮助其他人至少狩猎你的一个问题。谢谢! –

+0

嘿Rohit,thx的评论...我加了这个虽然因为他们都相关...在其他人的背景下回答一个将帮助我相信... – Kumar

+0

它本身不是“机器学习”,但更多NLTK和nlp。 – alvas

回答

8

Corpora复数为语料库。

语料库基本上意味着一个身体,在自然语言处理(NLP)的情况下,它意味着一个文本体。

(来源:https://www.google.com.sg/search?q=corpora


词典是一个词汇,单词列表,一个词典(来源:https://www.google.com.sg/search?q=lexicon

在NLTK,任何词典是因为考虑语料库单词列表也是正文文本。例如。停用词的列表可以在NLTK语料库API中找到:

>>> from nltk.corpus import stopwords 
>>> print stopwords.words('english') 
[u'i', u'me', u'my', u'myself', u'we', u'our', u'ours', u'ourselves', u'you', u'your', u'yours', u'yourself', u'yourselves', u'he', u'him', u'his', u'himself', u'she', u'her', u'hers', u'herself', u'it', u'its', u'itself', u'they', u'them', u'their', u'theirs', u'themselves', u'what', u'which', u'who', u'whom', u'this', u'that', u'these', u'those', u'am', u'is', u'are', u'was', u'were', u'be', u'been', u'being', u'have', u'has', u'had', u'having', u'do', u'does', u'did', u'doing', u'a', u'an', u'the', u'and', u'but', u'if', u'or', u'because', u'as', u'until', u'while', u'of', u'at', u'by', u'for', u'with', u'about', u'against', u'between', u'into', u'through', u'during', u'before', u'after', u'above', u'below', u'to', u'from', u'up', u'down', u'in', u'out', u'on', u'off', u'over', u'under', u'again', u'further', u'then', u'once', u'here', u'there', u'when', u'where', u'why', u'how', u'all', u'any', u'both', u'each', u'few', u'more', u'most', u'other', u'some', u'such', u'no', u'nor', u'not', u'only', u'own', u'same', u'so', u'than', u'too', u'very', u's', u't', u'can', u'will', u'just', u'don', u'should', u'now'] 

在NLTK(标准地称为Movie Reviews Corpus)的电影评论集是与情感极性分类 2K电影评论一文本数据集(来源:http://www.nltk.org/book/ch02.html

而且它常被用于教程目的引入到NLP和情绪分析,见http://www.nltk.org/book/ch06.htmlnltk NaiveBayesClassifier training for sentiment analysis


共发现是英语(它就像一个词库/字典,词对词关系)(来源:https://wordnet.princeton.edu/词汇数据库。

在NLTK中,它包含了开放式多语言WordNet(http://compling.hss.ntu.edu.sg/omw/),允许您查询其他语言的单词。由于它也是一个单词列表(在这种情况下,包括许多其他事物,关系,引理句,POS等),它也在NLTK中使用nltk.corpus进行调用。

的规范成语使用NLTK WordNet的是这样的:

>>> from nltk.corpus import wordnet as wn 
>>> wn.synsets('dog') 
[Synset('dog.n.01'), Synset('frump.n.01'), Synset('dog.n.03'), Synset('cad.n.01'), Synset('frank.n.02'), Synset('pawl.n.01'), Synset('andiron.n.01'), Synset('chase.v.01')] 

最简单的方法来了解/学习NLP行话和基础知识是要经过这些教程中NLTK书:http://www.nltk.org/book/