%% Test If Word Is Member of Embedding
% Test to determine if words are members of a word embedding.
% Load a pretrained word embedding using the fastTextWordEmbedding function. This function requires Text Analytics Toolbox™ Model for fastText English 16 Billion Token Word Embedding support package. If this support package is not installed, then the function provides a download link.

emb = fastTextWordEmbedding

% Test if the words "I", "love", and "fastTextWordEmbedding" are in the word embedding.

words = ["I" "love" "fastTextWordEmbedding"];
tf = isVocabularyWord(emb,words)

% Copyright 2018 The MathWorks, Inc.