随笔分类 -  Thinking in Python

摘要:需要的几个文件: 1.wordList.txt,即你要转化成vector的word list: 2.label.txt, 即图中显示的label,可以与wordlist.txt中的word不同。 3.model,用gensim生成的word2vec model; 4.运行buildWordVecto 阅读全文
posted @ 2017-06-08 11:33 max_xbw 阅读(1709) 评论(0) 推荐(1)
摘要:Task 1 : 首字母大写 赏析: re.sub,实现正则的替换。 Pattern : r"w+"表示匹配数字和字母下划线的多个字符。 repl : lambda match:match.group(0).capitalize()表示首字母大写。 阅读全文
posted @ 2017-05-16 13:22 max_xbw 阅读(375) 评论(0) 推荐(0)
摘要:转自:https://www.davidfischer.name/2015/08/generating-pdfs-with-and-without-python/ 阅读全文
posted @ 2017-04-21 17:27 max_xbw 阅读(1626) 评论(0) 推荐(0)