M = word2vec(emb,words) は、埋め込み emb 内の words の埋め込みベクトルを返します。単語が埋め込みボキャブラリにない場合、関数は NaN の行を返します。既定では、関数は大文字と小文字を区別します。
M = word2vec(emb,words,'IgnoreCase',true) は、前の構文のいずれかを使用して、大文字と小文字の区別なしで words の埋め込みベクトルを返します。埋め込み内の複数の単語が大文字と小文字のみの差異である場合、関数はそれらの 1 つに対応するベクトルを返し、特定のベクトルは返しません。
fastTextWordEmbedding を使用して、事前学習済みの単語埋め込みを読み込みます。この関数には、Text Analytics Toolbox™ Model for fastText English 16 Billion Token Word Embedding サポート パッケージが必要です。このサポート パッケージがインストールされていない場合、関数によってダウンロード用リンクが表示されます。
emb = fastTextWordEmbedding
emb =
wordEmbedding with properties:
Dimension: 300
Vocabulary: [1×1000000 string]
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.