Beispiel #1
0
# -*- coding: utf-8 -*-
import feedparser
import codecs
import Test_MeCab3 as M

f = codecs.open('/Users/somatakei/Downloads/jwo_instance_rdf.rdf','r','utf-8')
article = f.readlines()
f.close()
rss = feedparser.parse(article)
rss.entries.reverse()
for entry in rss.entries:
    article += entry.title
    article += "\n"
    article += entry.link
    article += "\n"
    article += entry.updated
    article += "\n" + "\n"
M.pp(article)
Beispiel #2
0
# -*- coding: utf-8 -*-
import codecs
import Test_MeCab3 as M
import Article_get_Bing as AgB

ret=[]
noun3 = ""
f = codecs.open('/Users/somatakei/OneDrive/talk.txt', 'r')
noun=f.readlines()
f.close()

for n in noun:
    ret += M.isMecab(n)

count2=0
n_most = ""
overlap=[]
n_cnt=0
for n in ret:
    count2+=1
    num = len(ret)
    count = count2
    while count < num:
        if n == ret[count]:
            del ret[count]
            num -= 1
            overlap.append(n)
        count+=1

for n in ret:
    if n_cnt<overlap.count(n):