2015-07-20 87 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/