Contents

NSLinguisticTagger

Analyze natural language text to tag part of speech and lexical class, identify names, perform lemmatization, and determine the language and script.

Declaration

class NSLinguisticTagger

Mentioned in

Overview

NSLinguisticTagger provides a uniform interface to a variety of natural language processing functionality with support for many different languages and scripts. You can use this class to segment natural language text into paragraphs, sentences, or words, and tag information about those segments, such as 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 NSLinguisticTagScheme 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.

Thread Safety

A single instance of NSLinguisticTagger should not be used simultaneously from multiple threads.

Topics

First Steps

Getting the Tag Schemes

Determining the Dominant Language and Orthography

Enumerating Linguistic Tags

Getting Linguistic Tags

Determining the Range of a Unit Token

Determining the Possible Tags

Notifying for Changes to the Analyzed String

Supporting Types

See Also

Deprecated