def main(): path = 'neko.txt.mecab' wdict = hist_words(importmecab(path)) sortwords = sorted( wdict.items(), key=lambda x: x[1], reverse=True) with open('knock36.txt', 'w', encoding='utf-8') as f: print(sortwords, file=f)
def main(): path = 'neko.txt.mecab' wdict = knock36.hist_words(importmecab(path)) showhist10(wdict)
def main(): path = 'neko.txt.mecab' surfaces = surfaceverb(importmecab(path)) with open('knock31.txt', 'w', encoding='utf-8') as f: print(surfaces, file=f)