This slide is used in study class in Web application circle in Waseda University.
And This slide is based on
"Introduction to Machine Learning with Python"
6. nグラム • Bag ofWords表現において、
トークン分割で1単語に分割するのがユニグラム
1単語で分割すると、
it is not bad
という文書の前後関係が失われ、
not badとして認識できなくなる
これの対策をするには前後関係を考慮する必要がある
=> 複数単語に分割する(nグラム)
例:
バイグラム => [“it is”, ”is not”, ”not bad”]
トリグラム =>[“it is not”, ”is not bad”]
6