Main Content
encode
Encode documents as matrix of word or n-gram counts
Description
Use encode
to encode an array of tokenized documents as a
matrix of word or n-gram counts according to a bag-of-words or bag-of-n-grams model. To
encode documents as vectors or word indices, use a wordEncoding
object.
specifies additional options using one or more name-value pair arguments.counts
= encode(___,Name,Value
)
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2017b