N-grams to check, specified as one of these values:
If ngrams
is a string array, cell array, or
pattern
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 ngrams
is a character vector,
then it represents a single word (unigram).
The value of ngrams(i,j)
corresponds to 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 ngrams
must
be empty.
If ngrams
contains multiple n-grams or patterns, then the
function returns 1
where any of the n-grams appear in the
corresponding document.
Example: ["An" ""; "An example"; "example" ""]
Data Types: string
| char
| cell