Structure

NSLinguisticTag

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

Declaration

struct NSLinguisticTag

Overview

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 tokenType scheme.

static let word: NSLinguisticTag

The token indicates a word.

static let punctuation: NSLinguisticTag

The token indicates punctuation.

static let whitespace: NSLinguisticTag

The token indicates white space of any sort.

static let other: NSLinguisticTag

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

Lexical Classes

Constants specifying the lexical class of a tag with the lexicalClass or nameTypeOrLexicalClass scheme.

static let adjective: NSLinguisticTag

This token is an adjective

static let adverb: NSLinguisticTag

This token is an adverb.

static let pronoun: NSLinguisticTag

This token is a pronoun.

static let determiner: NSLinguisticTag

This token is a determiner.

static let particle: NSLinguisticTag

This token is a particle.

static let preposition: NSLinguisticTag

This token is a preposition.

static let number: NSLinguisticTag

This token is a number.

static let conjunction: NSLinguisticTag

This token is a conjunction.

static let interjection: NSLinguisticTag

This token is an interjection.

static let classifier: NSLinguisticTag

This token is a classifier.

static let idiom: NSLinguisticTag

This token is an idiom.

static let otherWord: NSLinguisticTag

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).

static let sentenceTerminator: NSLinguisticTag

This token is a sentence terminator.

static let openQuote: NSLinguisticTag

This token is an open quote.

static let closeQuote: NSLinguisticTag

This token is a close quote.

static let openParenthesis: NSLinguisticTag

This token is an open parenthesis.

static let closeParenthesis: NSLinguisticTag

This token is a close parenthesis.

static let wordJoiner: NSLinguisticTag

This token is a word joiner.

static let otherPunctuation: NSLinguisticTag

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).

static let paragraphBreak: NSLinguisticTag

This token is a paragraph break.

static let otherWhitespace: NSLinguisticTag

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 nameType or nameTypeOrLexicalClass scheme.

static let personalName: NSLinguisticTag

This token is a personal name.

static let organizationName: NSLinguisticTag

This token is an organization name.

static let placeName: NSLinguisticTag

This token is a place name.

Relationships

See Also

Supporting Types

struct NSLinguisticTagScheme

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

enum NSLinguisticTaggerUnit

Constants representing linguistic units.