Type Alias

NLTag

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

Declaration

typedef NSString *NLTag;

Discussion

When you create a linguistic tagger, you specify one or more NLTagScheme 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 NLTag type represents the constant values that can be returned for certain NLTagScheme values.

Topics

Token Types

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

NLTagWord

A tag indicating that the token is a word.

NLTagPunctuation

A tag indicating that the token is punctuation.

NLTagWhitespace

A tag indicating that the token is white space of any sort.

NLTagOther

A tag indicating that the token is a non-linguistic item, such as a symbol.

Lexical Classes

Constants specifying the lexical class of a tag with the NLTagSchemeLexicalClass or NLTagSchemeNameTypeOrLexicalClass scheme.

NLTagNoun

A tag indicating that the token is a noun.

NLTagVerb

A tag indicating that the token is a verb.

NLTagAdjective

A tag indicating that the token is an adjective

NLTagAdverb

A tag indicating that the token is an adverb.

NLTagPronoun

A tag indicating that the token is a pronoun.

NLTagDeterminer

A tag indicating that the token is a determiner.

NLTagParticle

A tag indicating that the token is a particle.

NLTagPreposition

A tag indicating that the token is a preposition.

NLTagNumber

A tag indicating that the token is a number.

NLTagConjunction

A tag indicating that the token is a conjunction.

NLTagInterjection

A tag indicating that the token is an interjection.

NLTagClassifier

A tag indicating that the token is a classifier.

NLTagIdiom

A tag indicating that the token is an idiom.

NLTagOtherWord

A tag indicating that the 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).

NLTagSentenceTerminator

A tag indicating that the token is punctuation at the end of a sentence.

NLTagOpenQuote

A tag indicating that the token is an open quote.

NLTagCloseQuote

A tag indicating that the token is a close quote.

NLTagOpenParenthesis

A tag indicating that the token is an open parenthesis.

NLTagCloseParenthesis

A tag indicating that the token is a close parenthesis.

NLTagWordJoiner

A tag indicating that the token is a word joiner, signifying that two tokens on each side should not be broken up.

NLTagDash

A tag indicating that the token is a dash.

NLTagOtherPunctuation

A tag indicating that the 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).

NLTagParagraphBreak

A tag indicating that the token is a paragraph break.

NLTagOtherWhitespace

A tag indicating that the 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 NLTagSchemeNameType or NLTagSchemeNameTypeOrLexicalClass scheme.

NLTagPersonalName

A tag indicating that the token is a personal name.

NLTagOrganizationName

A tag indicating that the token is an organization name.

NLTagPlaceName

A tag indicating that the token is a place name.

See Also

Enumerating Linguistic Tags

- enumerateTagsInRange:unit:scheme:options:usingBlock:

Enumerates over a given range of the string for a particular unit and calls the specified block for each tag.

NLTaggerOptions

Constants for linguistic tagger enumeration specifying which tokens to omit and whether to join names.