2015年4月24日

摘要: Natural Language Processing with PythonCharpter 6.1 1 import nltk 2 from nltk.corpus import brown 3 4 def pos_features(sentence,i,history): 5 fea... 阅读全文
posted @ 2015-04-24 12:36 karis 阅读(547) 评论(0) 推荐(0) 编辑

2015年4月23日

摘要: Natural Language Processing with PythonCharpter 6.1suffix_fdist处代码稍微改动。 1 import nltk 2 from nltk.corpus import brown 3 4 def common_suffixes_fun(): ... 阅读全文
posted @ 2015-04-23 23:49 karis 阅读(272) 评论(0) 推荐(0) 编辑
摘要: Natural Language Processing with PythonChapter 6.1由于nltk.FreqDist的排序问题,获取电影文本特征词的代码有些微改动。 1 import nltk 2 from nltk.corpus import movie_reviews as mr ... 阅读全文
posted @ 2015-04-23 22:30 karis 阅读(200) 评论(0) 推荐(0) 编辑
摘要: Natural Language Processing with PythonChapter 4.8 1 colors = 'rgbcmyk' # red, green, blue, cyan, magenta, yellow, black 2 3 def bar_chart(catego... 阅读全文
posted @ 2015-04-23 15:07 karis 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 1 import nltk 2 3 def freq_sorted(text,ranklimit): 4 fd=nltk.FreqDist(text) 5 cumulative = 0.0 6 for rank, (word,freq) in enumerate(sort... 阅读全文
posted @ 2015-04-23 13:42 karis 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Let f(w) be the frequency of a word w in free text. Suppose that all the words of a text are ranked according to their frequency, with the most freque... 阅读全文
posted @ 2015-04-23 00:31 karis 阅读(459) 评论(0) 推荐(0) 编辑

2015年4月22日

摘要: 用Enthought Canopy作图果然方便。昨天频频出现无法识别pylab模块的异常,今天终于搞好了。以下是今天出来的图: 阅读全文
posted @ 2015-04-22 12:11 karis 阅读(133) 评论(0) 推荐(0) 编辑

2015年4月21日

摘要: Spoken input (top left) is analyzed, words are recognized, sentences are parsed and interpreted in context, application-specific actions take place (t... 阅读全文
posted @ 2015-04-21 20:26 karis 阅读(157) 评论(0) 推荐(0) 编辑

导航