%% Replace Words in Documents
% Use the replaceWords function to replace shorthand words with their corresponding full words.
% Create an array of tokenized documents.

str = [ ...
    "Increased activity Mon to Fri."
    "Reduced activity Sat to Sun."];
documents = tokenizedDocument(str)

% Replace the shorthand words with their corresponding full words.

oldWords = ["Mon" "Tue" "Wed" "Thu" "Fri" "Sat" "Sun"];
newWords = ["Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday" "Sunday"];
documents = replaceWords(documents,oldWords,newWords)

% Copyright 2018 The MathWorks, Inc.