2014年7月1日

摘要: 一般deep learning需要两步, unsupervised pre-train 和 superviesed NN training. Pre-training 用unsupervised方法train神经网络,得到word representation. 在第二步 supervised NN... 阅读全文

posted @ 2014-07-01 23:11 wintor12 阅读(207) 评论(0) 推荐(0) 编辑


2014年6月9日

摘要: The content is from this paper:Dependency Tree-based Sentiment Classification using CRFs with Hidden Variables, byTetsuji Nakagawa.A typical approach ... 阅读全文

posted @ 2014-06-09 12:22 wintor12 阅读(438) 评论(0) 推荐(0) 编辑


2014年5月31日

摘要: It is also interesting to examine the behaviour of a given model as the size of the data set is varied, as shown in Figure 1.6. We see that, for a giv... 阅读全文

posted @ 2014-05-31 07:47 wintor12 阅读(334) 评论(0) 推荐(0) 编辑


2014年3月26日

摘要: input and outputwrite lines:p = open(dst, 'w+') s=['12','34','56'] for a in s: p.write(a + '\n') p.close()read lines:p = open(dst, 'r') # s = p.read() # print s content = p.readlines() print content p.close()['12\n', '34\n', '56\n&# 阅读全文

posted @ 2014-03-26 23:23 wintor12 阅读(120) 评论(0) 推荐(0) 编辑


2014年3月25日

摘要: >>> def gender_features(word):... return {'last_letter': word[-1]}>>> gender_features('Shrek'){'last_letter': 'k'}>>> from nltk.corpus import names>>> import random>>> names = ([(name, 'male') for name in names.word 阅读全文

posted @ 2014-03-25 12:01 wintor12 阅读(478) 评论(0) 推荐(0) 编辑

摘要: In particular, the "value" of a structured object such as a list is actually just areferenceto the object.>>> foo = ['Monty', 'Python']>>> bar = foo >>> foo[1] = 'Bodkin' >>> bar['Monty', 'Bodkin']for item in set(s 阅读全文

posted @ 2014-03-25 10:24 wintor12 阅读(135) 评论(0) 推荐(0) 编辑

摘要: >>> from urllib import urlopen>>> url = "http://www.google.com">>> raw = urlopen(url).read()>>> tokens = nltk.word_tokenize(raw)>>> text = nltk.Text(tokens)>>> text.collocations()>>> f = open('document.txt')>>> 阅读全文

posted @ 2014-03-25 03:31 wintor12 阅读(656) 评论(0) 推荐(0) 编辑

摘要: ExampleDescriptionfileids()the files of the corpusfileids([categories])the files of the corpus corresponding to these categoriescategories()the categories of the corpuscategories([fileids])the categories of the corpus corresponding to these filesraw()the raw content of the corpusraw(fileids=[f1,f2,f 阅读全文

posted @ 2014-03-25 03:02 wintor12 阅读(433) 评论(0) 推荐(0) 编辑

摘要: from nltk.book import *>>> type(text1)http://nltk.googlecode.com/svn/trunk/doc/api/nltk.text.Text-class.htmltext1.concordance("monstrous")text1.similar("monstrous")sorted(set(text3))>>> f = FreqDist(text1)>>> fhttp://nltk.googlecode.com/svn/trunk/doc/ap 阅读全文

posted @ 2014-03-25 02:47 wintor12 阅读(439) 评论(0) 推荐(0) 编辑


2014年3月18日

摘要: K Nearest Neighbor (KNN from now on) is one of those algorithms that are very simple to understand but works incredibly well in practice. Also it is surprisingly versatile and its applications range from vision to proteins to computational geometry to graphs and so on . Most people learn the algorit 阅读全文

posted @ 2014-03-18 01:25 wintor12 阅读(407) 评论(0) 推荐(0) 编辑


Copyright © 2024 wintor12
Powered by .NET 9.0 on Kubernetes