New n-grams, specified as a string array, character vector, or a cell array of
character vectors.
If newNgrams
is a string array or cell array, then it has size
NumNgrams
-by-maxN
, where
NumNgrams
is the number of n-grams, and maxN
is
the length of the largest n-gram. If newNgrams
is a character
vector, then it represents a single word (unigram).
The value of newNgrams(i,j)
is the j
th word of
the i
th n-gram. If the number of words in the i
th
n-gram is less than maxN
, then the remaining entries of the
i
th row of newNgrams
are empty.
newNgrams
must have one row, or the same number of rows as
oldNgrams
.
For example, to specify both the unigram "Massachusetts"
, and the
bigram ["New" "York"]
, specify the 2-by-2 string array
["Massachusetts" ""; "New" "York"]
, where
"Massachusetts"
is padded with a single empty string
""
.
Data Types: string
| char
| cell