TopPage

  1. 日本語テキストを読み込むサンプルプログラム
    	#encoding: utf-8
    	import nltk
    	
    	raw = open('./sample.mecab').read()
    	words = raw.split();
    	print len(words)
    	text = nltk.Text(words)
    	gen = text.generate(300)
    	print gen