%% Remove Empty Documents from Array
% Remove documents containing no words from an array of tokenized documents.
% Create an array of tokenized documents which includes empty documents.

documents = tokenizedDocument([
    "an example of a short sentence"
    ""
    "a second short sentence"
    ""])

% Remove the empty documents.

newDocuments = removeEmptyDocuments(documents)

% Copyright 2012 The MathWorks, Inc.