11 2013 档案

mapreduce (二) MapReduce实现倒排索引(一) combiner是把同一个机器上的多个map的结果先聚合一次
摘要:1 思路:0.txt MapReduce is simple1.txt MapReduce is powerfull is simple2.txt Hello MapReduce bye MapReduce1 map函数:context.write(word:docid, 1) 即将word:doc... 阅读全文

posted @ 2013-11-27 00:41 雨渐渐 阅读(469) 评论(0) 推荐(0) 编辑

nutch fetcher.server.delay
摘要:1 配置因素 fetcher.server.delay 0.0 The number of seconds the fetcher will delay between successive requests to the same server.2 机器人协议因素FetchItemQueue fiq = fetchQueues.getFetchItemQueue(fit.queueID); fiq.crawlDelay = rules.getCrawlDelay(); if (LOG.isDebugEnabled()) {... 阅读全文

posted @ 2013-11-25 16:34 雨渐渐 阅读(222) 评论(0) 推荐(0) 编辑

nutch Fetcer阶段详解
摘要:job.setSpeculativeExecution(false); 抓网页阶段,不允许同一个任务运行多次,否则,网页就抓重了为了充分利用闲置资源,加快map 和 reduce 的执行,于是有SpeculativeExecution机制,同时运行多个map 或 reduce,先运行完的获胜,其他的干掉 阅读全文

posted @ 2013-11-25 11:42 雨渐渐 阅读(236) 评论(0) 推荐(0) 编辑

Hadoop 学习笔记(二) HDFS API
摘要:4.删除HDFS上的文件package proj;import java.io.IOException;import org.apache.hadoop.conf.Configuration;import org.apache.hadoop.fs.FileSystem;import org.apache.hadoop.fs.Path;public class DeleteFile { public static void main(String[] args) throws IOException { Configuration conf = new Configurati... 阅读全文

posted @ 2013-11-23 16:27 雨渐渐 阅读(302) 评论(0) 推荐(0) 编辑

Hadoop 学习笔记(一) HDFS API
摘要:http://www.cnblogs.com/liuling/p/2013-6-17-01.html 这个也不错http://www.teamwiki.cn/hadoop/thrift thrift编程1.上传本地文件到HDFSpackage proj;import org.apache.... 阅读全文

posted @ 2013-11-23 11:29 雨渐渐 阅读(354) 评论(0) 推荐(0) 编辑

nutch getOutLinks 外链的处理
摘要:转载自:http://blog.csdn.net/witsmakemen/article/details/8067530通过跟踪发现,Fetcher获得网页解析链接没有问题,获得了网页中所有的链接,然后在output()函数中通过FetcherOutputFormat类输出(包含在ParseResu... 阅读全文

posted @ 2013-11-18 15:59 雨渐渐 阅读(390) 评论(0) 推荐(0) 编辑

could only be replicated to 0 nodes, instead of 1
摘要:周末机房断电,然后hadoop爆出如题的错误,解决方案就是关闭所有节点的防火墙,相关命令如下:查看防火墙状态:/etc/init.d/iptables status暂时关闭防火墙:/etc/init.d/iptables stop禁止防火墙在系统启动时启动/sbin/chkconfig --leve... 阅读全文

posted @ 2013-11-15 14:52 雨渐渐 阅读(184) 评论(0) 推荐(0) 编辑

豆单
摘要:http://book.douban.com/people/flychen50/wish?qq-pf-to=pcqq.c2c 阅读全文

posted @ 2013-11-14 16:55 雨渐渐 阅读(123) 评论(0) 推荐(0) 编辑

python 编码问题
摘要:__author__ = 'dell'# -*- coding: utf-8 -*-from lxml import etreeimport urllib2import timedef loadCategory(): res = {} f_txt = open('catetory.txt') while True: line = f_txt.readline() if not line: break line = line.strip().decode('gbk') tokens = line.sp... 阅读全文

posted @ 2013-11-13 15:19 雨渐渐 阅读(188) 评论(0) 推荐(0) 编辑

python urllib2
摘要:http://my.oschina.net/duhaizhang/blog/69883 阅读全文

posted @ 2013-11-13 11:22 雨渐渐 阅读(134) 评论(0) 推荐(0) 编辑

词性标注-隐马尔科夫模型应用
摘要:问题的提出已知:词序列: 寻找词性序列: 使得条件概率最大: 解:(忽略词序列概率,因为没用)图示:具体实现就是:动态规划-维特比算法 [维特比算法.....自己看吧,数学之美上有解释]概念解释:发射概率:某个词作为名词出现的频率/名词在语料库中出现的频率 也叫生成概率 某个隐状态生成显状态的概率转移概率:某个词性到另一个词性的频率/某个词性生成所有其他词性的频率(也就是这个词性的频率)初始概率:(BEMS) B/所有句子开头是BEMS的总合 阅读全文

posted @ 2013-11-03 12:32 雨渐渐 阅读(1264) 评论(0) 推荐(0) 编辑

词性标注对照表
摘要:形容词aa形容词最/d 大/a 的/utrue副形词adad副形词一定/d 能够/v 顺利/ad 实现/v 。/wtrue形语素Agag形语素喜/v 煞/Ag 人/ntrue名形词anan名形词人民/n 的/u 根本/a 利益/n 和/c 国家/n 的/u 安稳/an 。/wtrue区别词bb区别词副/b 书记/n 王/nr 思齐/nrtrue连词cc连词全军/n 和/c 武警/n 先进/a 典型/n 代表/ntrue副词dd副词两侧/f 台柱/n 上/f 分别/d 雄踞/v 着/utrue副语素Dgdg副语素用/v 不/d 甚/Dg 流利/a 的/u 中文/nz 主持/v 节目/n ... 阅读全文

posted @ 2013-11-02 13:31 雨渐渐 阅读(1558) 评论(0) 推荐(0) 编辑

导航