addPartOfSpeechDetails
R2026bAdd part-of-speech tags to documents
Syntax
Description
Use addPartOfSpeechDetails to add part-of-speech tags to
documents.
The function supports English, Japanese, German, and Korean text.
detects parts of speech in updatedDocuments = addPartOfSpeechDetails(documents)documents and updates the token
details. The function, by default, retokenizes the text for part-of-speech tagging.
For example, the function splits the word "you're" into the tokens "you" and "'re".
To get the part-of-speech details from updatedDocuments, use
tokenDetails.
specifies additional options using one or more name-value arguments. For example,
updatedDocuments = addPartOfSpeechDetails(documents,Name=Value)addPartOfSpeechDetails(documents,DiscardKnownValues=true)
specifies to discard previously computed details and recompute them.
Tip
Use addPartOfSpeechDetails before using the
lower, upper,
erasePunctuation,
normalizeWords, removeWords,
and removeStopWords functions as
addPartOfSpeechDetails uses information that is removed by
these functions.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
More About
Algorithms
If the input documents do not contain sentence details, then the function first runs
addSentenceDetails.
Version History
Introduced in R2018b