Type Alias

NSLinguisticTag

A token, lexical class, name, lemma, language, or script returned by a linguistic tagger for natural language text.

Declaration

typedef NSString *NSLinguisticTag;

Discussion

When you create a linguistic tagger, you specify one or more NSLinguisticTagScheme constants that correspond to the kind of information you want to know about a selection of natural language text. When working with linguistic tags using the methods described in Getting Linguistic Tags and Enumerating Linguistic Tags, the returned value depends on the specified scheme. The NSLinguisticTag type represents the constant values that can be returned for certain NSLinguisticTagScheme values.

Topics

Token Types

Constants representing the token type of a tag with the NSLinguisticTagSchemeTokenType scheme.

You may use pointer equality to compare the values with tag constants.

NSLinguisticTagWord

The token indicates a word.

NSLinguisticTagPunctuation

The token indicates punctuation.

NSLinguisticTagWhitespace

The token indicates white space of any sort.

NSLinguisticTagOther

The token indicates a non-linguistic item, such as a symbol.

Lexical Classes

Constants specifying the lexical class of a tag with the NSLinguisticTagSchemeLexicalClass or NSLinguisticTagSchemeNameTypeOrLexicalClass scheme.

You may use pointer equality to compare the values with tag constants.

NSLinguisticTagNoun

The token is a noun.

NSLinguisticTagVerb

This token is a verb.

NSLinguisticTagAdjective

This token is an adjective

NSLinguisticTagAdverb

This token is an adverb.

NSLinguisticTagPronoun

This token is a pronoun.

NSLinguisticTagDeterminer

This token is a determiner.

NSLinguisticTagParticle

This token is a particle.

NSLinguisticTagPreposition

This token is a preposition.

NSLinguisticTagNumber

This token is a number.

NSLinguisticTagConjunction

This token is a conjunction.

NSLinguisticTagInterjection

This token is an interjection.

NSLinguisticTagClassifier

This token is a classifier.

NSLinguisticTagIdiom

This token is an idiom.

NSLinguisticTagOtherWord

This token is a word other than a kind described by other lexical classes (noun, verb, adjective, adverb, pronoun, determiner, particle, preposition, number, conjunction, interjection, classifier, and idiom).

NSLinguisticTagSentenceTerminator

This token is a sentence terminator.

NSLinguisticTagOpenQuote

This token is an open quote.

NSLinguisticTagCloseQuote

This token is a close quote.

NSLinguisticTagOpenParenthesis

This token is an open parenthesis.

NSLinguisticTagCloseParenthesis

This token is a close parenthesis.

NSLinguisticTagWordJoiner

This token is a word joiner.

NSLinguisticTagDash

This token is a dash.

NSLinguisticTagOtherPunctuation

This token is punctuation other than a kind described by other lexical classes (sentence terminator, open or close quote, open or close parenthesis, word joiner, and dash).

NSLinguisticTagParagraphBreak

This token is a paragraph break.

NSLinguisticTagOtherWhitespace

This token is whitespace other than a kind described by other lexical classes (paragraph break).

Name Types

Constants specifying the name type of a tag with the NSLinguisticTagSchemeNameType or NSLinguisticTagSchemeNameTypeOrLexicalClass scheme.

You may use pointer equality to compare the values with tag constants.

NSLinguisticTagPersonalName

This token is a personal name.

NSLinguisticTagOrganizationName

This token is an organization name.

NSLinguisticTagPlaceName

This token is a place name.

See Also

Supporting Types

NSLinguisticTagScheme

Constants for the tag schemes specified when initializing a linguistic tagger.

NSLinguisticTaggerUnit

Constants representing linguistic units.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software