%% Specify Known Words
% Create a tokenized document array.

str = [
    "Analyze text data using MATLAB."
    "Another documnent cntaining typos."];
documents = tokenizedDocument(str);

% Correct the spelling of the words in the documents using the correctSpelling function.

updatedDocuments = correctSpelling(documents)

% Notice that the word "MATLAB" gets split into the two words "MAT" and "LAB".
% Correct the spelling of the documents and specify "MATLAB" as a known word using the 'KnownWords' option.

updatedDocuments = correctSpelling(documents,'KnownWords',"MATLAB")

% Copyright 2019 The MathWorks, Inc.