kalor

导航

 

Step 1:将xml格式文件emotional.xml转化为Json格式文件emotionalJSON.txt

经过专家人工标注后的微博情绪分析emotional.xml格式文件如下:

<SampleData>

<
weibo id="1" emotion-type="none">
<
sentence id="1" emotion_tag="N">三八节下午路过中牟县~见到很多美女~手执鲜花[鲜花]~一打听~这里不仅美女如云~而且是千古笫一帅哥潘安的故里。。。</sentence>
<
sentence id="2" emotion_tag="N">[给力][萌]</sentence>
</
weibo>
<
weibo id="2" emotion-type="sadness">
<
sentence id="1" emotion_tag="Y" emotion-1-type="like" emotion-2-type="none">源海都学愤怒鸟的声音,好像好厉害…</sentence>
<
sentence id="2" emotion_tag="Y" emotion-1-type="sadness" emotion-2-type="none">还比愤怒鸟射击的动作,我为啥一千啊现在…</sentence>
<
sentence id="3" emotion_tag="Y" emotion-1-type="sadness" emotion-2-type="anger">海赫还悄悄话了刚才,怎么不是我四千二的时候啊哈哈,悲愤!</sentence>
</
weibo>
<
weibo id="3" emotion-type="none">
<
sentence id="1" emotion_tag="N">女孩子并不在乎你有没有钱,她在乎的是你会不会发奋努力改变现状;</sentence>
<
sentence id="2" emotion_tag="N">女孩子并不在乎与你生活一起会遇到困难,她在乎的是你会不会迎难而上;</sentence>
<
sentence id="3" emotion_tag="N">女孩子并不在乎你有多浪漫,她在乎的是能不能从生活的点滴中感受到你的爱;</sentence>
<
sentence id="4" emotion_tag="N">女孩子并不在乎你现在的境况如何,她在乎的是你能不能让她看到你们的未来。</sentence>
</
weibo>
<
weibo id="4" emotion-type="none">
<
sentence id="1" emotion_tag="N">25-27岁年纪还小,叫小生(小剩);</sentence>
<
sentence id="2" emotion_tag="N">28-30岁已经成熟,叫书生(熟剩);</sentence>
<
sentence id="3" emotion_tag="N">31-33岁只能悠着晃着等待机遇,叫优等生(悠等剩);</sentence>
<
sentence id="4" emotion_tag="N">34-36岁事业有成钻石男,叫博士生(不是剩);</sentence>
<
sentence id="5" emotion_tag="N">37岁往上感觉彻底被逼成剩男了,尊之为毕业生(逼爷剩);</sentence>
<
sentence id="6" emotion_tag="N">45岁以后就是超级圣诞老人(剩单老人)啦!</sentence>
</
weibo>
<
weibo id="5" emotion-type="none">
<
sentence id="1" emotion_tag="N">《变形金刚3》港澳6月29日上映,大陆REAL.D.3D及IMAX3D上映时间尚不明确。</sentence>
<
sentence id="2" emotion_tag="N">等吧。</sentence>
<
sentence id="3" emotion_tag="N">等不及的就去香港百老汇影城吧。</sentence>
</
weibo>
</SampleData>
 

 

emotional.xml文件经过json-lib.jar转换后的Json格式文件emotionalJSON.txt内容如下:

{"@id":"1","@emotion-type":"none","sentence":[{"@id":"1","@emotion_tag":"N","#text":"三八节下午路过中牟县~见到很多美女~手执鲜花[鲜花]~一打听~这里不仅美女如云~而且是千古笫一帅哥潘安的故里。。。"},{"@id":"2","@emotion_tag":"N","#text":"[给力][萌]"}]},{"@id":"2","@emotion-type":"sadness","sentence":[{"@id":"1","@emotion_tag":"Y","@emotion-1-type":"like","@emotion-2-type":"none","#text":"源海都学愤怒鸟的声音,好像好厉害…"},{"@id":"2","@emotion_tag":"Y","@emotion-1-type":"sadness","@emotion-2-type":"none","#text":"还比愤怒鸟射击的动作,我为啥一千啊现在…"},{"@id":"3","@emotion_tag":"Y","@emotion-1-type":"sadness","@emotion-2-type":"anger","#text":"海赫还悄悄话了刚才,怎么不是我四千二的时候啊哈哈,悲愤!"}]},{"@id":"3","@emotion-type":"none","sentence":[{"@id":"1","@emotion_tag":"N","#text":"女孩子并不在乎你有没有钱,她在乎的是你会不会发奋努力改变现状;"},{"@id":"2","@emotion_tag":"N","#text":"女孩子并不在乎与你生活一起会遇到困难,她在乎的是你会不会迎难而上;"},{"@id":"3","@emotion_tag":"N","#text":"女孩子并不在乎你有多浪漫,她在乎的是能不能从生活的点滴中感受到你的爱;"},{"@id":"4","@emotion_tag":"N","#text":"女孩子并不在乎你现在的境况如何,她在乎的是你能不能让她看到你们的未来。"}]},{"@id":"4","@emotion-type":"none","sentence":[{"@id":"1","@emotion_tag":"N","#text":"25-27岁年纪还小,叫小生(小剩);"},{"@id":"2","@emotion_tag":"N","#text":"28-30岁已经成熟,叫书生(熟剩);"},{"@id":"3","@emotion_tag":"N","#text":"31-33岁只能悠着晃着等待机遇,叫优等生(悠等剩);"},{"@id":"4","@emotion_tag":"N","#text":"34-36岁事业有成钻石男,叫博士生(不是剩);"},{"@id":"5","@emotion_tag":"N","#text":"37岁往上感觉彻底被逼成剩男了,尊之为毕业生(逼爷剩);"},{"@id":"6","@emotion_tag":"N","#text":"45岁以后就是超级圣诞老人(剩单老人)啦!"}]},{"@id":"5","@emotion-type":"none","sentence":[{"@id":"1","@emotion_tag":"N","#text":"《变形金刚3》港澳6月29日上映,大陆REAL.D.3D及IMAX3D上映时间尚不明确。"},{"@id":"2","@emotion_tag":"N","#text":"等吧。"},{"@id":"3","@emotion_tag":"N","#text":"等不及的就去香港百老汇影城吧。"}]}

上述转换代码如下:

    //将emotional.xml文件转换为字符串格式:
public
static String getXMLString(String filePath) throws IOException { StringBuffer sb = new StringBuffer(); BufferedReader br = null; String line = null; try { br = new BufferedReader(new FileReader(filePath)); while(true) { line = br.readLine(); if(line == null) break; sb.append(line + "\n"); } } catch(Exception e) { e.printStackTrace(); } finally { br.close(); } return sb.toString(); } /** * 将xml字符串转换为JSON对象 * @param xmlFile xml字符串 * @return JSON对象 */ public static JSON getJSONFromXml() { XMLSerializer xmlSerializer = new XMLSerializer(); JSON json = xmlSerializer.read( getXMLString("emotional.xml")); return json; }
   
    public static void WriteJSONFile(){
FileOutputStream fos = new FileOutputStream("emotionalJSON.txt");  
       fos.write(getJSONFromXml().toString().getBytes());  
       fos.close();
}

    

Step 2 : 由于Hive导入的数据格式有限,故需要转化为SerDe格式,上一篇博客已提到,且Hive数据变量命名时开头或中间或结尾不能有' - ',‘ $ ', ' # ', '@'等invalid字符,且https://github.com/cloudera/cdh-twitter-example/blob/master/hive-serdes/src/main/java/com/cloudera/hive/serde/JSONSerDe.java文件中要求各json对象间以'\n'分开,故将原emotionalJSON.txt文件再次经过filter后的文件emotionalJSONReplace.txt内容如下:

{"id":"1","emotion_type":"none","sentence":[{"id":"1","emotion_tag":"N","text":"三八节下午路过中牟县~见到很多美女~手执鲜花[鲜花]~一打听~这里不仅美女如云~而且是千古笫一帅哥潘安的故里。。。"},{"id":"2","emotion_tag":"N","text":"[给力][萌]"}]}
{"id":"2","emotion_type":"sadness","sentence":[{"id":"1","emotion_tag":"Y","emotion_1_type":"like","emotion_2_type":"none","text":"源海都学愤怒鸟的声音,好像好厉害…"},{"id":"2","emotion_tag":"Y","emotion_1_type":"sadness","emotion_2_type":"none","text":"还比愤怒鸟射击的动作,我为啥一千啊现在…"},{"id":"3","emotion_tag":"Y","emotion_1_type":"sadness","emotion_2_type":"anger","text":"海赫还悄悄话了刚才,怎么不是我四千二的时候啊哈哈,悲愤!"}]}
{"id":"3","emotion_type":"none","sentence":[{"id":"1","emotion_tag":"N","text":"女孩子并不在乎你有没有钱,她在乎的是你会不会发奋努力改变现状;"},{"id":"2","emotion_tag":"N","text":"女孩子并不在乎与你生活一起会遇到困难,她在乎的是你会不会迎难而上;"},{"id":"3","emotion_tag":"N","text":"女孩子并不在乎你有多浪漫,她在乎的是能不能从生活的点滴中感受到你的爱;"},{"id":"4","emotion_tag":"N","text":"女孩子并不在乎你现在的境况如何,她在乎的是你能不能让她看到你们的未来。"}]}
{"id":"4","emotion_type":"none","sentence":[{"id":"1","emotion_tag":"N","text":"25_27岁年纪还小,叫小生(小剩);"},{"id":"2","emotion_tag":"N","text":"28_30岁已经成熟,叫书生(熟剩);"},{"id":"3","emotion_tag":"N","text":"31_33岁只能悠着晃着等待机遇,叫优等生(悠等剩);"},{"id":"4","emotion_tag":"N","text":"34_36岁事业有成钻石男,叫博士生(不是剩);"},{"id":"5","emotion_tag":"N","text":"37岁往上感觉彻底被逼成剩男了,尊之为毕业生(逼爷剩);"},{"id":"6","emotion_tag":"N","text":"45岁以后就是超级圣诞老人(剩单老人)啦!"}]}
{"id":"5","emotion_type":"none","sentence":[{"id":"1","emotion_tag":"N","text":"《变形金刚3》港澳6月29日上映,大陆REAL.D.3D及IMAX3D上映时间尚不明确。"},{"id":"2","emotion_tag":"N","text":"等吧。"},{"id":"3","emotion_tag":"N","text":"等不及的就去香港百老汇影城吧。"}]}

上述过滤后的代码如下:

    private static void ReplaceInvalidJSONString(String filePath) throws IOException
    {
        BufferedReader br = null;
        FileOutputStream fos = null;
        
        String line = null;
        
        try
        {
            fos = new FileOutputStream("emotionalJSONReplace.txt");  
            
            br = new BufferedReader(new FileReader(filePath));
            while( (line = br.readLine()) != null )
            {
                line = line.replace("@", "");
                line = line.replace("#", "");
                line = line.replace("-", "_");
                line = line.replaceAll("]},", "]}" + "\n");
                
                fos.write(line.getBytes());  
            }
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
        finally
        {
            br.close();
            fos.close();
        }
        
    }

Step 3 : 得到了Hive所能理解的数据输入格式后,将其导入到microblog表中,hive执行过程如下:

从上述所解析后的json文件可知,hive所需表结构如下:

hive (dataprocess)> create table if not exists microblog(                                                            
                  > id string comment 'weibo id',                                                                    
                  > emotion_type string comment 'weibo emotional type',                                              
                  > sentence array<map<string,string>> comment 'all sentences of the weibo')                         
                  > row format serde 'JSON_To_Data.JSONSerDe';
OK Time taken: 0.219 seconds

hive (dataprocess)> describe microblog;
OK
col_name    data_type    comment
id    string    from deserializer
emotion_type    string    from deserializer
sentence    array<map<string,string>>    from deserializer
Time taken: 0.527 seconds
hive (dataprocess)
> load data local inpath '/home/landen/Eclipse_WorkSpace/ConvertXmlToJson/emotionalJSONReplace.txt' > overwrite into table microblog; Copying data from file:/home/landen/Eclipse_WorkSpace/ConvertXmlToJson/emotionalJSONReplace.txt Copying file: file:/home/landen/Eclipse_WorkSpace/ConvertXmlToJson/emotionalJSONReplace.txt Loading data to table dataprocess.microblog Deleted hdfs://localhost:9000/home/landen/UntarFile/hive-0.10.0/user/hive/warehouse/dataprocess.db/microblog Table dataprocess.microblog stats: [num_partitions: 0, num_files: 1, num_rows: 0, total_size: 2019868, raw_data_size: 0] OK Time taken: 0.653 seconds hive (dataprocess)> select * from microblog limit 20; OK id emotion_type sentence 1 none         [{"id":"1","emotion_tag":"N","text":"三八节下午路过中牟县~见到很多美女~手执鲜花[鲜花]~一打听~这里不仅美女如云~而且是千古笫一帅哥潘安的故里。。。"},{"id":"2","emotion_tag":"N","text":"[给力][萌]"}] 2 sadness         [{"id":"1","emotion_tag":"Y","emotion_1_type":"like","emotion_2_type":"none","text":"源海都学愤怒鸟的声音,好像好厉害…"},{"id":"2","emotion_tag":"Y","emotion_1_type":"sadness","emotion_2_type":"none","text":"还比愤怒鸟射击的动作,我为啥一千啊现在…"},{"id":"3","emotion_tag":"Y","emotion_1_type":"sadness","emotion_2_type":"anger","text":"海赫还悄悄话了刚才,怎么不是我四千二的时候啊哈哈,悲愤!"}] 3 none         [{"id":"1","emotion_tag":"N","text":"女孩子并不在乎你有没有钱,她在乎的是你会不会发奋努力改变现状;"},{"id":"2","emotion_tag":"N","text":"女孩子并不在乎与你生活一起会遇到困难,她在乎的是你会不会迎难而上;"},{"id":"3","emotion_tag":"N","text":"女孩子并不在乎你有多浪漫,她在乎的是能不能从生活的点滴中感受到你的爱;"},{"id":"4","emotion_tag":"N","text":"女孩子并不在乎你现在的境况如何,她在乎的是你能不能让她看到你们的未来。"}] 4 none         [{"id":"1","emotion_tag":"N","text":"25_27岁年纪还小,叫小生(小剩);"},{"id":"2","emotion_tag":"N","text":"28_30岁已经成熟,叫书生(熟剩);"},{"id":"3","emotion_tag":"N","text":"31_33岁只能悠着晃着等待机遇,叫优等生(悠等剩);"},{"id":"4","emotion_tag":"N","text":"34_36岁事业有成钻石男,叫博士生(不是剩);"},{"id":"5","emotion_tag":"N","text":"37岁往上感觉彻底被逼成剩男了,尊之为毕业生(逼爷剩);"},{"id":"6","emotion_tag":"N","text":"45岁以后就是超级圣诞老人(剩单老人)啦!"}] 5 none         [{"id":"1","emotion_tag":"N","text":"《变形金刚3》港澳6月29日上映,大陆REAL.D.3D及IMAX3D上映时间尚不明确。"},{"id":"2","emotion_tag":"N","text":"等吧。"},{"id":"3","emotion_tag":"N","text":"等不及的就去香港百老汇影城吧。"}] 6 like         null 8 like         [{"id":"1","emotion_tag":"N","text":"人生路上,我们会无数次被自己的决定或碰到的逆境击倒、欺凌甚至碾得粉身碎骨。"},{"id":"2","emotion_tag":"Y","emotion_1_type":"sadness","emotion_2_type":"none","text":"使我们觉得自己似乎一文不值。"},{"id":"3","emotion_tag":"Y","emotion_1_type":"none","emotion_2_type":"none","text":"其实无论发生什么,或将要发生什么,在上帝的眼中,我们永远不会丧失价值。"},{"id":"4","emotion_tag":"Y","emotion_1_type":"like","emotion_2_type":"none","text":"所以不管在人生路上还是考研路上,面对逆境时我们依然要相信自己是无价之宝、自己是最棒的。"}] 9 anger        [{"id":"1","emotion_tag":"N","text":"如果南中国海的石油开采能让国内油价降低一分钱,我就支持维护南海主权;如果能降低一毛,我愿意多缴税做军费,如果降低一块,我愿意参军。"},{"id":"2","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"disgust","text":"如果只是维护三大石油集团的利益,跟我有毛关系呢?"},{"id":"3","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"disgust","text":"那些像打了鸡血一样的愤青,你坐飞机他们会给你燃油附加费打八折吗?"}] 10 happiness   null 12 none        [{"id":"1","emotion_tag":"N","text":"宗庆后同学说,了解政治,但不卷入政治。"},{"id":"2","emotion_tag":"N","text":"这样才能保持好政商的关系。"},{"id":"3","emotion_tag":"N","text":"与好几个做生意的人交流,他们的意思大概这样,做生意就好好做生意,参政可以,但不要去议政。"},{"id":"4","emotion_tag":"N","text":"议不好,生意黄了,人进去了,你的员工怎么办?"},{"id":"5","emotion_tag":"N","text":"要有社会责任!"},{"id":"6","emotion_tag":"N","text":"议政让哪些一身轻的个人去做。"}] 13 none        [{"id":"1","emotion_tag":"N","text":"甚好,要鼓励并奖励。"},{"id":"2","emotion_tag":"N","text":"以5年为期,设立奖金,看谁记得多、快、好、狠。"},{"id":"3","emotion_tag":"N","text":"期间不许涉猎别的内容——民族智慧要获得整体提升,兴许先要废掉一批脑袋。"},{"id":"4","emotion_tag":"N","text":"//瓦当:求加入:)"}] 14 sadness     [{"id":"1","emotion_tag":"Y","emotion_1_type":"happiness","emotion_2_type":"like","text":"话说大约十年前,十块钱炸肉岗尖一盘,加一瓶啤酒,就是我一顿饱饱的午餐。"},{"id":"2","emotion_tag":"Y","emotion_1_type":"surprise","emotion_2_type":"none","text":"现在呢,图中这寥寥十数根,就是十块钱的肉,算开胃菜么?"},{"id":"3","emotion_tag":"Y","emotion_1_type":"sadness","emotion_2_type":"anger","text":"通胀的猪肉伤不起啊[泪]"}] 15 none        null 17 like        [{"id":"1","emotion_tag":"N","text":"地球保卫战..."},{"id":"2","emotion_tag":"Y","emotion_1_type":"like","emotion_2_type":"none","text":"如同观看一部真正的大片一样..."},{"id":"3","emotion_tag":"Y","emotion_1_type":"like","emotion_2_type":"none","text":"看到了首回合人类的顽强抵抗..."},{"id":"4","emotion_tag":"Y","emotion_1_type":"disgust","emotion_2_type":"none","text":"看到了次回合宇宙发挥不折手段的恐怖..."},{"id":"5","emotion_tag":"N","text":"人类在搏命..."},{"id":"6","emotion_tag":"N","text":"而宇宙却可以轻而易举地用常规或非常规地方式压迫你..."},{"id":"7","emotion_tag":"Y","emotion_1_type":"sadness","emotion_2_type":"none","text":"无助..."},{"id":"8","emotion_tag":"Y","emotion_1_type":"sadness","emotion_2_type":"none","text":"无奈..."},{"id":"9","emotion_tag":"Y","emotion_1_type":"sadness","emotion_2_type":"none","text":"绝望..."},{"id":"10","emotion_tag":"N","text":"各种心情涌上心头..."},{"id":"11","emotion_tag":"Y","emotion_1_type":"happiness","emotion_2_type":"none","text":"庆幸能看到这样一部上下集的大片..."},{"id":"12","emotion_tag":"Y","emotion_1_type":"none","emotion_2_type":"none","text":"相信人类依然会不断地努力去征服的!"}] 18 like        [{"id":"1","emotion_tag":"Y","emotion_1_type":"like","emotion_2_type":"none","text":"《证据》也后终于要送审了,期待的人们,为之祈祷顺利通过吧!"},{"id":"2","emotion_tag":"N","text":"群众的呼声very importantly!!!"}] 19 none        [{"id":"1","emotion_tag":"N","text":"刚刚听一位长沙的朋友说,这几年长沙的内涝确实少了,而以前几乎是逢雨必涝。"},{"id":"2","emotion_tag":"N","text":"前天的一则新闻说,目前只要是半天50毫米左右的暴雨,长沙几乎无内涝之忧。"},{"id":"3","emotion_tag":"N","text":"今天老天爷加大了力度,以81毫米检查长沙的城市排涝能力..."}] 20 none        null 22 like        null 24 sadness     [{"id":"1","emotion_tag":"Y","emotion_1_type":"sadness","emotion_2_type":"none","text":"有些事情非常让人揪心,为何直接创造产品的收入很低(农民、蓝领、灰领)而间接的(药批、菜批、建材批、酒批等等批们)却赚得盆满钵满呀。"},{"id":"2","emotion_tag":"Y","emotion_1_type":"sadness","emotion_2_type":"none","text":"发人深省......"}] 25 disgust     null Time taken: 0.15 seconds hive (dataprocess)> select * from microblog where emotion_type = 'anger' limit 20; Total MapReduce jobs = 1 Launching Job 1 out of 1 Number of reduce tasks is set to 0 since there's no reduce operator Starting Job = job_201305071751_0003, Tracking URL = http://localhost:50030/jobdetails.jsp?jobid=job_201305071751_0003 Kill Command = /home/landen/UntarFile/hadoop-1.0.4/libexec/../bin/hadoop job -kill job_201305071751_0003 Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 0 2013-05-07 20:24:40,763 Stage-1 map = 0%, reduce = 0% 2013-05-07 20:24:46,793 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.67 sec 2013-05-07 20:24:47,797 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.67 sec 2013-05-07 20:24:48,801 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.67 sec 2013-05-07 20:24:49,805 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.67 sec 2013-05-07 20:24:50,810 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.67 sec 2013-05-07 20:24:51,814 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.67 sec 2013-05-07 20:24:52,818 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 1.67 sec MapReduce Total cumulative CPU time: 1 seconds 670 msec Ended Job = job_201305071751_0003 MapReduce Jobs Launched: Job 0: Map: 1 Cumulative CPU: 1.67 sec HDFS Read: 254231 HDFS Write: 8795 SUCCESS Total MapReduce CPU Time Spent: 1 seconds 670 msec OK id emotion_type sentence 9  anger       [{"id":"1","emotion_tag":"N","text":"如果南中国海的石油开采能让国内油价降低一分钱,我就支持维护南海主权;如果能降低一毛,我愿意多缴税做军费,如果降低一块,我愿意参军。"},{"id":"2","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"disgust","text":"如果只是维护三大石油集团的利益,跟我有毛关系呢?"},{"id":"3","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"disgust","text":"那些像打了鸡血一样的愤青,你坐飞机他们会给你燃油附加费打八折吗?"}] 29 anger       [{"id":"1","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"fear","text":"贵州人,大学副教授,因举报贪污腐败而家破人亡,流落街头。"},{"id":"2","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"因多次寻求司法帮助未果,现辗转于各地,希望通过广大有善之人的帮助,能够异地审理此案件。"},{"id":"3","emotion_tag":"N","text":"请大家随手转发,因为您的善举或许正无意中成就一份正义。"},{"id":"4","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"fear","text":"(之前的围脖在转发4771次后被和谐,新浪编辑,如果你们再和谐,下一个被迫害的就是你家人)"}] 38 anger       [{"id":"1","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"钱是小事,把老师教坏了[抓狂] 钱是小事,把老师教坏了[抓狂] //leithnannan:教育产业化哦,苦了爹妈的银子哟 //王久辛:[赞] [赞] //龙音九天:作为老师,严重关注,严重支持!!!!"},{"id":"2","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"长此以往,中国的教育恐怕没有明天。"},{"id":"3","emotion_tag":"N","text":"其实问题不在教师,也不完全在家长,而在于教育利益集团的蛊惑煽动"}] 49 anger       [{"id":"1","emotion_tag":"Y","emotion_1_type":"disgust","emotion_2_type":"anger","text":"焚烧秸秆、垃圾的味道已经持续好几天了,最近几天早晨就在这种味道中醒来,真是令人不爽。"},{"id":"2","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"明天再这样,只有请教科教卫的同志,这到底是什么味道,是真的露天焚烧垃圾的味道吗?"},{"id":"3","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"是他们趁着夜色的掩护焚烧垃圾吗?"},{"id":"4","emotion_tag":"N","text":"如果是。。。"},{"id":"5","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"disgust","text":"是不是可以请有关同志虚拟关心一下。。。"}] 64 anger       [{"id":"1","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"和乐清看守所警号035654的警察大吵一架。"},{"id":"2","emotion_tag":"N","text":"让他拿出不让见的法律依据。"},{"id":"3","emotion_tag":"N","text":"拿不出。"},{"id":"4","emotion_tag":"N","text":"旁边一个警察说,也没有让见的依据。"},{"id":"5","emotion_tag":"N","text":"我说,你连基本的行政法常识都不懂。"},{"id":"6","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"disgust","text":"你们每个律师来见,都去核实吗?"},{"id":"7","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"做坏事的人以后天打雷劈。"}] 73 anger       null 129 anger       [{"id":"1","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"儿子近来表现不是很好,今天我教育了他:人吃饭是为了活着,但活着不一定就是为了吃饭;"},{"id":"2","emotion_tag":"N","text":"同样读书不是为了完成老师布置的作业而读,但完成作业是读书的必须的第一步,不要读死书,更不能死读书!"},{"id":"3","emotion_tag":"N","text":"任何事情要去努力更要学会变通。。。!"}] 167 anger       null 170 anger       [{"id":"1","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"disgust","text":"国奥队你们还有脸坐商务舱呀,你们的飞机就该掉下来把你们扔死海里,不要脸的王大雷你还说阿曼太热了,南极冷你们又受不了,本来不想说你们了,什么玩意呢,国家也是你们溅呀,这个队连空调屋都别给他们,看看我们的后备力量在土地上练球,你们怎么不播经费给孩子们呢!"},{"id":"2","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"disgust","text":"国奥队,你们死在阿曼吧"}] 187 anger       [{"id":"1","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"disgust","text":"重庆电信你特么牛逼了,老子在广东也好贵阳也罢,都没有说用自己身份证不能办宽带的,只有你这里是这样,特么你是多牛逼,是多牛逼?"},{"id":"2","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"disgust","text":"老子用联通去,特么王八蛋"}] 189 anger       [{"id":"1","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"如果这都不叫相配,你告诉什么叫做爱你就要变成你?!"},{"id":"2","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"什么叫做夫妻相啊!!!!"},{"id":"3","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"[抓狂] (图F:yjlove 非邪教勿手滑哦!)"}] 244 anger       [{"id":"1","emotion_tag":"N","text":"qqxh310:不会像去年终极版那样,将4排的某低价票区,画得比14排的1280还宽吧?"},{"id":"2","emotion_tag":"N","text":"再将已近乎于和舞台平行的高看台区画到中轴线附近,以示视线很好?"},{"id":"3","emotion_tag":"Y","emotion_1_type":"disgust","emotion_2_type":"none","text":"明明座位已开到极致的变态,出来的图却像半场光景。"},{"id":"4","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"disgust","text":"没见过这么自黑旗下歌手的脑残公司!"},{"id":"5","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"disgust","text":"别人家都可劲儿吹,你们倒好,为赚黑心钱,将图上低价区虚假放大。"}] 296 anger       [{"id":"1","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"菲律宾都这么猖狂,美国支持?"},{"id":"2","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"尼玛美国了不起啊?"},{"id":"3","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"我都不知道祖国的国防建设建哪儿去了?"},{"id":"4","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"fear","text":"造飞机导弹尼玛当玩具啊?!"}] 299 anger       [{"id":"1","emotion_tag":"N","text":"钱云会案人间百态三:妄为。"},{"id":"2","emotion_tag":"N","text":"代表人物:乐清政 府。"},{"id":"3","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"disgust","text":"钱案发生后,一系列的行为,抢尸、警察、特警、边防警察、狼狗、搜查、拘捕、跟踪等等,无不是恣意妄为,活生生把内部矛盾当成敌我矛盾处理的架势,授人以柄。"},{"id":"4","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"disgust","text":"就连一些愿意为之辩护的人都不好意思开口,除了窦含章、吴法天。"}] 338 anger       [{"id":"1","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"晚上喂完儿子饭,我就忙着洗碗,托地,洗澡,洗衣服,晾衣服时我发现桌上的菜还没收拾,就喊一直在看电视的老公收下菜,他居然疾呼:你洗完碗怎么不收菜啊?"},{"id":"2","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"尼玛!"},{"id":"3","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"我忙了一晚,喊你做这点事还跟我叫。"},{"id":"4","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"跟你们臭男人说:现在男女都赚钱,家务不再是女人的事,需要双方平摊着做。"},{"id":"5","emotion_tag":"N","text":"支持我的姐妹转起来!"}] 341 anger       [{"id":"1","emotion_tag":"Y","emotion_1_type":"disgust","emotion_2_type":"none","text":"[织] 中小学假期作业坚持捍卫教辅产业链~作业布置一级级超强叠压,不报班孩子绝对不会做!"},{"id":"2","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"disgust","text":"尤其中学,家长根本辅导不了~百分百是被各个教委学校老师合谋算计=逼进教辅班~神圣教育被彻底邪恶化龌龊化!!"}] 369 anger       [{"id":"1","emotion_tag":"N","text":"刚刚心血来潮下楼买了瓶空气清香剂,先喷每个房间然后再喷厕所。"},{"id":"2","emotion_tag":"N","text":"这时小云同学神经兮兮的说:茅房能有茉莉花的香味吗?"},{"id":"3","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"真是够讨厌扫兴的!"},{"id":"4","emotion_tag":"N","text":"[懒得理你]"}] 375 anger       [{"id":"1","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"狗屎的地铁很多线下午才开通,那个线路图又不标清楚兜兜转转两个钟又回到老街搭地铁!"},{"id":"2","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"又碰到一群狗屁领导装逼!"},{"id":"3","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":",乘客被拦在外面让领导坐空车!!"}] 390 anger       [{"id":"1","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"都他妈跟你说了别打孩子!!!"},{"id":"2","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"考不上大学肿么了!!!"},{"id":"3","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"考不上大学就不是你丫生的了吗!!!"},{"id":"4","emotion_tag":"Y","emotion_1_type":"anger","emotion_2_type":"none","text":"别逼老娘发火!!!"}] 431 anger       null Time taken: 20.559 seconds hive (dataprocess)>

其中有些sentence为null,说明解析时出现一点错误,更新中

 

 

 

posted on 2013-05-07 21:28  kalor  阅读(1142)  评论(0编辑  收藏  举报