08 2014 档案

摘要:对从网络上抓取到的网页进行处理:建立网络库,分词,去重,if-tdf计算权重,归一化,然后根据查询词将文本相似度从高到低的依次返回给客户第一阶段:python网络爬虫抓取网页,并存盘第二阶段:对磁盘上的网页文件建立网页库,将全部网页写入网页库,并建立相应网页的偏移量索引文件(1 23 100)-->... 阅读全文
posted @ 2014-08-28 14:32 rail 阅读(451) 评论(0) 推荐(0)
摘要:编辑距离: 一个单词变换成另一个单词所需的步数,基本步骤:增加一个字符,减少一个字符,修改一个字符。应用:搜索的时候使用ipone-->iphone,编辑距离为1,在类似文本纠错的项目中,找出编辑距离最小的值(可以用priority_queue),实现模糊匹配!1.英文int Edit_Disten... 阅读全文
posted @ 2014-08-18 15:10 rail 阅读(766) 评论(0) 推荐(0)
摘要:#include #include #include #include using namespace std;templatestruct LRUCacheEntry{ K key; T data; LRUCacheEntry* prev; LRUCacheEntry* n... 阅读全文
posted @ 2014-08-14 17:14 rail 阅读(564) 评论(0) 推荐(0)
摘要:[syswj@host 0813]$ cat dic_tree.cpp #include #include #define MAX 26using namespace std;typedef struct TrieNode{ int ncount; struct TrieNode *ne... 阅读全文
posted @ 2014-08-13 15:27 rail 阅读(149) 评论(0) 推荐(0)