04 2015 档案

Clustering text documents using k-means
摘要:源代码的链接为http://scikit-learn.org/stable/auto_examples/text/document_clustering.htmlLoading 20 newsgroups dataset for categories:['alt.atheism', 'talk.re... 阅读全文

posted @ 2015-04-25 22:53 karis 阅读(243) 评论(0) 推荐(0)

Classification of text documents: using a MLComp dataset
摘要:注:原文代码链接http://scikit-learn.org/stable/auto_examples/text/mlcomp_sparse_document_classification.html运行结果为:Loading 20 newsgroups training set... 20 new... 阅读全文

posted @ 2015-04-25 17:36 karis 阅读(330) 评论(0) 推荐(0)

Analyzing the Meaning of Sentences
摘要:1. How can we represent natural language meaning so that a computer can process these representations?2. How can we associate meaning representations ... 阅读全文

posted @ 2015-04-25 13:50 karis 阅读(137) 评论(0) 推荐(0)

Identifying Dialogue Act Type
摘要:Natural Language Processing with PythonChapter 6.2 1 import nltk 2 from nltk.corpus import nps_chat as nchat 3 4 def dialogue_act_features(post): 5 ... 阅读全文

posted @ 2015-04-24 19:58 karis 阅读(183) 评论(0) 推荐(0)

Sequence Classification
摘要: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 阅读(561) 评论(0) 推荐(0)

Part of Speech Tagging
摘要: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 阅读(278) 评论(0) 推荐(0)

Document Classification
摘要: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 阅读(208) 评论(0) 推荐(0)

Bar Chart of Frequency of modals in different sections of the Brown Corpus
摘要: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 阅读(179) 评论(0) 推荐(0)

Frequent Distribution sorted by frequency
摘要: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 阅读(174) 评论(0) 推荐(0)

Zipf’s Law
摘要: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 阅读(471) 评论(0) 推荐(0)

<Natural Language Processing with Python>学习笔记二
摘要:用Enthought Canopy作图果然方便。昨天频频出现无法识别pylab模块的异常,今天终于搞好了。以下是今天出来的图: 阅读全文

posted @ 2015-04-22 12:11 karis 阅读(140) 评论(0) 推荐(0)

<Natural Language Processing with Python>学习笔记一
摘要: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 阅读(183) 评论(0) 推荐(0)

导航