随笔分类 -  杂项

simhash与重复信息识别
摘要:在工作学习中,我往往感叹数学奇迹般的解决一些貌似不可能完成的任务,并且十分希望将这种喜悦分享给大家,就好比说:“老婆,出来看上帝”…… 随着信息爆炸时代的来临,互联网上充斥着着大量的近重复信息,有效地识别它们是一个很有意义的课题。例如,对于搜索引擎的爬虫系统来说,收录重复的网页是毫无意义的,只会造成存储和计算资源的浪费;同时,展示重复的信息对于用户来说也并不是最好的体验。造成网页近重复的可能原因主要包括:镜像网站内容复制嵌入广告计数改变少量修改 一个简化的爬虫系统架构如下图所示: 事实上,传统比较两个文本相似性的方法,大多是将文本分词之后,转化为特征向量距离的度量,比如常见的欧氏距离、海明.. 阅读全文

posted @ 2014-02-20 11:55 cofday 阅读(581) 评论(0) 推荐(1)

libtool版本过新的问题
摘要:安装过程中出现: libtool: Version mismatch error. This islibtool2.4.2, but the libtool: definition of this LT_INIT comes from lib tool2.2.10 libtool: You should recreate aclocal.m4 with macros from lib tool 2.4.2 libtool: and run autoconf again. 的错误,google解决之,有三种方法:第一种:运行 rm aclocal.m4 & aclocal & a 阅读全文

posted @ 2013-12-11 14:15 cofday 阅读(2455) 评论(0) 推荐(0)

利用正则将xml数据解析为数组
摘要:function xml_to_array( $xml ){ $reg = '/]*>([\x00-\xFF]*)/'; if(preg_match_all($reg, $xml, $matches)) { $count = count($matches[0]); for($i = 0; $i < $count; $i++) { $subxml= $matches[2][$i]; $key = $matches[1][$i]; if(preg_match( $reg, ... 阅读全文

posted @ 2013-12-04 14:42 cofday 阅读(205) 评论(0) 推荐(0)

导航