'''
分かち書き、辞書生成
'''

# utf-8
import MeCab, os, glob

def wakati(text):
    t = MeCab.Tagger("-Owakati")
    m = t.parse(text)
    result = m.rstrip(" \n").split(" ")
    return result

path = "kingyo_ryoran.txt"
with open(path, 'r') as t:
    text = t.read()

word = wakati(text)
wt = ' '.join(word)
open('kingyo.wakati', 'w', encoding='utf-8').write(wt)

5e6f3a0e9dfac4d6820a139f77e2e7a97cf8d136
<mask token>


def wakati(text):
    t = MeCab.Tagger('-Owakati')
    m = t.parse(text)
    result = m.rstrip(' \n').split(' ')
    return result


<mask token>

<mask token>


def wakati(text):
    t = MeCab.Tagger('-Owakati')
    m = t.parse(text)
    result = m.rstrip(' \n').split(' ')
    return result


<mask token>
with open(path, 'r') as t:
    text = t.read()
<mask token>
open('kingyo.wakati', 'w', encoding='utf-8').write(wt)

<mask token>


def wakati(text):
    t = MeCab.Tagger('-Owakati')
    m = t.parse(text)
    result = m.rstrip(' \n').split(' ')
    return result


path = 'kingyo_ryoran.txt'
with open(path, 'r') as t:
    text = t.read()
word = wakati(text)
wt = ' '.join(word)
open('kingyo.wakati', 'w', encoding='utf-8').write(wt)

<mask token>
import MeCab, os, glob


def wakati(text):
    t = MeCab.Tagger('-Owakati')
    m = t.parse(text)
    result = m.rstrip(' \n').split(' ')
    return result


path = 'kingyo_ryoran.txt'
with open(path, 'r') as t:
    text = t.read()
word = wakati(text)
wt = ' '.join(word)
open('kingyo.wakati', 'w', encoding='utf-8').write(wt)

'''
分かち書き、辞書生成
'''

# utf-8
import MeCab, os, glob

def wakati(text):
    t = MeCab.Tagger("-Owakati")
    m = t.parse(text)
    result = m.rstrip(" \n").split(" ")
    return result

path = "kingyo_ryoran.txt"
with open(path, 'r') as t:
    text = t.read()

word = wakati(text)
wt = ' '.join(word)
open('kingyo.wakati', 'w', encoding='utf-8').write(wt)
