第9章リカレントニューラルネットワーク
9.2.6. Summary9.2.6 まとめ
Text is among the most common forms of sequence data encountered in deep learning. Common choices for what constitutes a token are characters, words, and word pieces. To preprocess text, we usually (i) split text into tokens; (ii) build a vocabulary to map token strings to numerical indices; and (iii) convert text data into token indices for models to manipulate. In practice, the frequency of words tends to follow Zipf’s law. This is true not just for individual words (unigrams), but also for -grams.
英語のヒント
テキストは、深層学習で出会う系列データの最もよくある形の一つである。トークンとするもののよくある選択は、文字、単語、単語の断片である。テキストを前処理するには、ふつう、(i)テキストをトークンに分割し、(ii)トークンの文字列を数値のインデックスに写す語彙を作り、(iii)モデルが扱えるようテキストデータをトークンのインデックスに変換する。実際には、単語の頻度はジップの法則に従う傾向がある。これは個々の単語(ユニグラム)だけでなく、グラムにも当てはまる。