%% Importance of Documents
% Create an array of tokenized documents.

str = [
    "the quick brown fox jumped over the lazy dog"
    "the fast brown fox jumped over the lazy dog"
    "the lazy dog sat there and did nothing"
    "the other animals sat there watching"];
documents = tokenizedDocument(str)

% Calculate their LexRank scores.

scores = lexrankScores(documents);

% Visualize the scores in a bar chart.

figure
bar(scores)
xlabel("Document")
ylabel("Score")
title("LexRank Scores")

% Copyright 2019 The MathWorks, Inc.