示例#1
0
def main():
    for sentence in read_parse_txt():
        connect_word = ''
        for index, word in enumerate(sentence):
            if word['pos'] == '名詞':
                connect_word += word['surface']
            else:
                if connect_word != '':
                    print(connect_word)
                    connect_word = ''
示例#2
0
def main():
    for sentence in read_parse_txt():
        for word in sentence:
            if word['pos'] == '動詞':
                print(word['base'])
示例#3
0
def main():
    for sentence in read_parse_txt():
        for index,word in enumerate(sentence):
            if word['pos'] == '名詞' and sentence[index+1]['surface'] == 'の' and sentence[index+2]['pos'] == '名詞':
                print(word['surface']  +sentence[index+1]['surface'] + sentence[index+2]['surface'])
示例#4
0
def main():
    for sentence in read_parse_txt():
        for word in sentence:
            if word['pos'] == '名詞' and word['pos1'] == 'サ変接続':
                print(word['surface'])