A tagger that analyzes natural language text.
- iOS 12.0+
- macOS 10.14+
- tvOS 12.0+
- watchOS 5.0+
- Mac Catalyst 13.0+Beta
- Natural Language
NLTagger supports many different languages and scripts. Use it to segment natural language text into paragraph, sentence, or word units and to tag each unit with information like part of speech, lexical class, lemma, script, and language.
When you create a linguistic tagger, you specify what kind of information you're interested in by passing one or more
NLTag values. Set the
string property to the natural language text you want to analyze, and the linguistic tagger processes it according to the specified tag schemes. You can then enumerate over the tags in a specified range, using the methods described in Enumerating Linguistic Tags, to get the information requested for a given scheme and unit.