2016-10-10から1日間の記事一覧
13章まで終了
05. n-gram 与えられたシーケンス(文字列やリストなど)からn-gramを作る関数を作成せよ.この関数を用い,"I am an NLPer"という文から単語bi-gram,文字bi-gramを得よ def n_gram(s,n): sentence = s.split() result = [] len_sentence = len(sentence) f…
13章まで終了
05. n-gram 与えられたシーケンス(文字列やリストなど)からn-gramを作る関数を作成せよ.この関数を用い,"I am an NLPer"という文から単語bi-gram,文字bi-gramを得よ def n_gram(s,n): sentence = s.split() result = [] len_sentence = len(sentence) f…