Structure

NLTagger.Options

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

Declaration

struct Options

Topics

Constants

static var omitWords: NLTagger.Options

Omit tokens of type word (items considered to be words).

static var omitPunctuation: NLTagger.Options

Omit tokens of type punctuation (all punctuation).

static var omitWhitespace: NLTagger.Options

Omit tokens of type whitespace (whitespace of all sorts).

static var omitOther: NLTagger.Options

Omit tokens of type other (non-linguistic items, such as symbols).

static var joinNames: NLTagger.Options

Typically, multiple-word names will be returned as multiple tokens, following the standard tokenization practice of the tagger.

static var joinContractions: NLTagger.Options

Contractions will be returned as one token.

Initializers

init(rawValue: UInt)

Creates the option with a raw value.

Relationships

Conforms To

See Also

Enumerating Linguistic Tags

func enumerateTags(in: Range<String.Index>, unit: NLTokenUnit, scheme: NLTagScheme, options: NLTagger.Options, using: (NLTag?, Range<String.Index>) -> Bool)

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

struct NLTag

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

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