08 2014 档案
摘要:打算分以下几个部分进行1. 用python写一个爬虫爬取网易新闻2. 用分词工具对爬下来的文字进行处理, 形成语料库3. 根据TF-IDF, 自动找出新闻的关键词4. 根据TF-IDF, 实现相似新闻推荐step 1a今天一天都在弄python爬虫, 花了好大力气才写出一个勉强可用的版本 1 # -...
阅读全文
摘要:参考资料, 阮一峰的博客 http://www.ruanyifeng.com/blog/2013/03/tf-idf.html非常感谢他, 能用如此通俗易懂的文字来阐述概念TF --Term Frequency -- 词频 = 某词在文档中的出现频率/文档的总词数IDF --Inverse Docu...
阅读全文
摘要:与Edit Distance问题类似, 纯dp状态转移方程如下在poj上找了一道题目 poj1458, 水过代码如下 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #...
阅读全文
摘要:leetcode的题目Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You h...
阅读全文