function emb = fastTextWordEmbedding()
%

%   Copyright 2017-2022 The MathWorks, Inc.

% Check if support package is installed
breadcrumbFile = 'textanalytics.internal.supportpackages.IsFastTextEnglishWordEmbeddingInstalled';
fullPath = which(breadcrumbFile);

ok = ~isempty(fullPath);
if ok
    % Check that the zip file is in the expected location
    zipfile = textanalytics.internal.supportpackages.getFastTextEnglishEmbeddingLocation(fullPath);
    ok = exist(zipfile, 'file');
end
if ~ok
    name     = 'Text Analytics Toolbox Model for fastText English 16 Billion Token Word Embedding';
    basecode = 'FASTTEXTENGEMBEDDING';

    error(message('textanalytics:supportpackages:NotInstalled', mfilename, name, basecode));
else
    emb     = readWordEmbedding(zipfile);
end
