%% Create Word Cloud from Text Data
% Extract the text from sonnets.txt using extractFileText and display the text of the first sonnet.

str = extractFileText("sonnets.txt");
extractBefore(str,"II")

% Display the words from the sonnets in a word cloud.

figure
wordcloud(str);

% Copyright 2017 The MathWorks, Inc.