【发布时间】:2014-05-07 23:19:37
【问题描述】:
Using an NLTK Conditional Frequency Distribution and the nltk.bigrams function, train a bigram model on the Genesis:
text = nltk.corpus.genesis.words('english-kjv.txt')
bigrams = nltk.bigrams(text)
cfd = nltk.ConditionalFreqDist(bigrams)
Answer the following questions
What is the Probability of ‘begining’ given ‘the’?
What is the probability of ‘the’?
注意:您作为答案给出的概率必须是可从该语料库计算得出的概率。
您好,有什么可以帮帮我的吗?这是在 nltk 书中。当我得到它时,我得到了 78%,这没有意义。我试图在 Python 中计算它。
【问题讨论】:
-
零,“开始”不是这样拼写的 :)
-
我的天才! ..那么呢?我还是 78
标签: python nltk corpus tagged-corpus