<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.14.0 -",
    "tvOS: 12.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NaturalLanguage",
  "identifier" : "/documentation/NaturalLanguage/NLTag",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Natural Language"
    ],
    "preciseIdentifier" : "c:@T@NLTag"
  },
  "title" : "NLTag"
}
-->

# NLTag

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

```
struct NLTag
```

## Overview

When you create a linguistic tagger, you specify one or more [`NLTagScheme`](/documentation/NaturalLanguage/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 in [`NLTagger`](/documentation/NaturalLanguage/NLTagger), the returned value depends on the specified scheme. The [`NLTag`](/documentation/NaturalLanguage/NLTag) type represents the constant values that can be returned for certain [`NLTagScheme`](/documentation/NaturalLanguage/NLTagScheme) values.

## Topics

### Token types

Constants representing the token type of a tag with the [`NLTagSchemeTokenType`](/documentation/NaturalLanguage/NLTagScheme/tokenType)

A scheme that classifies tokens according to their broad type: word, punctuation, or whitespace. scheme.

[`NLTagWord`](/documentation/NaturalLanguage/NLTag/word)

A tag indicating that the token is a word.

[`NLTagPunctuation`](/documentation/NaturalLanguage/NLTag/punctuation)

A tag indicating that the token is punctuation.

[`NLTagWhitespace`](/documentation/NaturalLanguage/NLTag/whitespace)

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

[`NLTagOther`](/documentation/NaturalLanguage/NLTag/other)

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`](/documentation/NaturalLanguage/NLTagScheme/lexicalClass)

A scheme that classifies tokens according to class: part of speech, type of punctuation, or whitespace. or [`NLTagSchemeNameTypeOrLexicalClass`](/documentation/NaturalLanguage/NLTagScheme/nameTypeOrLexicalClass)

A scheme that classifies tokens corresponding to names according to [`nameType`](/documentation/NaturalLanguage/NLTagScheme/nameType), and classifies all other tokens according to [`lexicalClass`](/documentation/NaturalLanguage/NLTagScheme/lexicalClass). scheme.

[`NLTagNoun`](/documentation/NaturalLanguage/NLTag/noun)

A tag indicating that the token is a noun.

[`NLTagVerb`](/documentation/NaturalLanguage/NLTag/verb)

A tag indicating that the token is a verb.

[`NLTagAdjective`](/documentation/NaturalLanguage/NLTag/adjective)

A tag indicating that the token is an adjective

[`NLTagAdverb`](/documentation/NaturalLanguage/NLTag/adverb)

A tag indicating that the token is an adverb.

[`NLTagPronoun`](/documentation/NaturalLanguage/NLTag/pronoun)

A tag indicating that the token is a pronoun.

[`NLTagDeterminer`](/documentation/NaturalLanguage/NLTag/determiner)

A tag indicating that the token is a determiner.

[`NLTagParticle`](/documentation/NaturalLanguage/NLTag/particle)

A tag indicating that the token is a particle.

[`NLTagPreposition`](/documentation/NaturalLanguage/NLTag/preposition)

A tag indicating that the token is a preposition.

[`NLTagNumber`](/documentation/NaturalLanguage/NLTag/number)

A tag indicating that the token is a number.

[`NLTagConjunction`](/documentation/NaturalLanguage/NLTag/conjunction)

A tag indicating that the token is a conjunction.

[`NLTagInterjection`](/documentation/NaturalLanguage/NLTag/interjection)

A tag indicating that the token is an interjection.

[`NLTagClassifier`](/documentation/NaturalLanguage/NLTag/classifier)

A tag indicating that the token is a classifier.

[`NLTagIdiom`](/documentation/NaturalLanguage/NLTag/idiom)

A tag indicating that the token is an idiom.

[`NLTagOtherWord`](/documentation/NaturalLanguage/NLTag/otherWord)

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`](/documentation/NaturalLanguage/NLTag/sentenceTerminator)

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

[`NLTagOpenQuote`](/documentation/NaturalLanguage/NLTag/openQuote)

A tag indicating that the token is an open quote.

[`NLTagCloseQuote`](/documentation/NaturalLanguage/NLTag/closeQuote)

A tag indicating that the token is a close quote.

[`NLTagOpenParenthesis`](/documentation/NaturalLanguage/NLTag/openParenthesis)

A tag indicating that the token is an open parenthesis.

[`NLTagCloseParenthesis`](/documentation/NaturalLanguage/NLTag/closeParenthesis)

A tag indicating that the token is a close parenthesis.

[`NLTagWordJoiner`](/documentation/NaturalLanguage/NLTag/wordJoiner)

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

[`NLTagDash`](/documentation/NaturalLanguage/NLTag/dash)

A tag indicating that the token is a dash.

[`NLTagOtherPunctuation`](/documentation/NaturalLanguage/NLTag/otherPunctuation)

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`](/documentation/NaturalLanguage/NLTag/paragraphBreak)

A tag indicating that the token is a paragraph break.

[`NLTagOtherWhitespace`](/documentation/NaturalLanguage/NLTag/otherWhitespace)

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`](/documentation/NaturalLanguage/NLTagScheme/nameType)

A scheme that classifies tokens according to whether they are part of a named entity. or [`NLTagSchemeNameTypeOrLexicalClass`](/documentation/NaturalLanguage/NLTagScheme/nameTypeOrLexicalClass)

A scheme that classifies tokens corresponding to names according to [`nameType`](/documentation/NaturalLanguage/NLTagScheme/nameType), and classifies all other tokens according to [`lexicalClass`](/documentation/NaturalLanguage/NLTagScheme/lexicalClass). scheme.

[`NLTagPersonalName`](/documentation/NaturalLanguage/NLTag/personalName)

A tag indicating that the token is a personal name.

[`NLTagOrganizationName`](/documentation/NaturalLanguage/NLTag/organizationName)

A tag indicating that the token is an organization name.

[`NLTagPlaceName`](/documentation/NaturalLanguage/NLTag/placeName)

A tag indicating that the token is a place name.

### Initializers

[`init(_:)`](/documentation/NaturalLanguage/NLTag/init(_:))

Creates a new tag.

[`init(rawValue:)`](/documentation/NaturalLanguage/NLTag/init(rawValue:))

Creates a new tag from the specified raw value.

## Relationships

### Conforms To

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)