摘要: Excel取消隐藏: 先按 CTRL + A 全部选中然后再按 CTRL + SHIFT + 9鼠标右击 列标,取消隐藏。 阅读全文
posted @ 2016-08-09 15:12 陈丙丁 阅读(92) 评论(0) 推荐(0)
摘要: 加载自定义语料库: 1 from nltk.corpus import PlaintextCorpusReader 2 corpus_root = '/tmp' #路径 3 wordlists = PlaintextCorpusReader(corpus_root, '.*') #可以是a.txt 阅读全文
posted @ 2016-07-15 16:13 陈丙丁 阅读(176) 评论(0) 推荐(0)
摘要: BagOfWords: 1. 见上一篇jieba分词。 2. 见上篇,读取分词后文件 3. 统计词频并表示成向量: sklearn工具包方法: from sklearn.feature_extraction.text import CountVectorizer as cv bows = cv(mi 阅读全文
posted @ 2016-06-23 11:22 陈丙丁 阅读(185) 评论(0) 推荐(0)
摘要: python windows 环境下常用资源: http://www.lfd.uci.edu/~gohlke/pythonlibs/ 阅读全文
posted @ 2016-06-16 11:15 陈丙丁 阅读(117) 评论(0) 推荐(0)
摘要: 中文分词后文档转换成英文处理,代码: paths = r"路径" #文件名0.txt posts = [open(os.path.join(paths,f)).read() for f in os.listdir(paths)] #打开方式1 # 中文分词/写入分词后的文件 pathsCut = r 阅读全文
posted @ 2016-06-08 10:41 陈丙丁 阅读(1696) 评论(0) 推荐(0)