<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSLinguisticTag",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@T@NSLinguisticTag"
  },
  "title" : "NSLinguisticTag"
}
-->

# NSLinguisticTag

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

```
struct NSLinguisticTag
```

## Overview

When you create a linguistic tagger, you specify one or more [`NSLinguisticTagScheme`](/documentation/Foundation/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`](/documentation/Foundation/NSLinguisticTag) type represents the constant values that can be returned for certain [`NSLinguisticTagScheme`](/documentation/Foundation/NSLinguisticTagScheme) values.

## Topics

### Token Types

Constants representing the token type of a tag with the [`NSLinguisticTagSchemeTokenType`](/documentation/Foundation/NSLinguisticTagScheme/tokenType)

Classifies tokens according to their broad type:  word, punctuation, or whitespace. scheme. In Objective-C you may use pointer equality to compare the values with tag constants.

[`NSLinguisticTagWord`](/documentation/Foundation/NSLinguisticTag/word)

The token indicates a word.

[`NSLinguisticTagPunctuation`](/documentation/Foundation/NSLinguisticTag/punctuation)

The token indicates punctuation.

[`NSLinguisticTagWhitespace`](/documentation/Foundation/NSLinguisticTag/whitespace)

The token indicates white space of any sort.

[`NSLinguisticTagOther`](/documentation/Foundation/NSLinguisticTag/other)

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

### Lexical Classes

Constants specifying the lexical class of a tag with the [`NSLinguisticTagSchemeLexicalClass`](/documentation/Foundation/NSLinguisticTagScheme/lexicalClass)

Classifies tokens according to class:  part of speech, type of punctuation, or whitespace. or [`NSLinguisticTagSchemeNameTypeOrLexicalClass`](/documentation/Foundation/NSLinguisticTagScheme/nameTypeOrLexicalClass)

Classifies tokens corresponding to names according to [`nameType`](/documentation/Foundation/NSLinguisticTagScheme/nameType), and classifies all other tokens according to [`lexicalClass`](/documentation/Foundation/NSLinguisticTagScheme/lexicalClass). scheme. In Objective-C you may use pointer equality to compare the values with tag constants.

[`NSLinguisticTagNoun`](/documentation/Foundation/NSLinguisticTag/noun)

The token is a noun.

[`NSLinguisticTagVerb`](/documentation/Foundation/NSLinguisticTag/verb)

This token is a verb.

[`NSLinguisticTagAdjective`](/documentation/Foundation/NSLinguisticTag/adjective)

This token is an adjective

[`NSLinguisticTagAdverb`](/documentation/Foundation/NSLinguisticTag/adverb)

This token is an adverb.

[`NSLinguisticTagPronoun`](/documentation/Foundation/NSLinguisticTag/pronoun)

This token is a pronoun.

[`NSLinguisticTagDeterminer`](/documentation/Foundation/NSLinguisticTag/determiner)

This token is a determiner.

[`NSLinguisticTagParticle`](/documentation/Foundation/NSLinguisticTag/particle)

This token is a particle.

[`NSLinguisticTagPreposition`](/documentation/Foundation/NSLinguisticTag/preposition)

This token is a preposition.

[`NSLinguisticTagNumber`](/documentation/Foundation/NSLinguisticTag/number)

This token is a number.

[`NSLinguisticTagConjunction`](/documentation/Foundation/NSLinguisticTag/conjunction)

This token is a conjunction.

[`NSLinguisticTagInterjection`](/documentation/Foundation/NSLinguisticTag/interjection)

This token is an interjection.

[`NSLinguisticTagClassifier`](/documentation/Foundation/NSLinguisticTag/classifier)

This token is a classifier.

[`NSLinguisticTagIdiom`](/documentation/Foundation/NSLinguisticTag/idiom)

This token is an idiom.

[`NSLinguisticTagOtherWord`](/documentation/Foundation/NSLinguisticTag/otherWord)

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`](/documentation/Foundation/NSLinguisticTag/sentenceTerminator)

This token is a sentence terminator.

[`NSLinguisticTagOpenQuote`](/documentation/Foundation/NSLinguisticTag/openQuote)

This token is an open quote.

[`NSLinguisticTagCloseQuote`](/documentation/Foundation/NSLinguisticTag/closeQuote)

This token is a close quote.

[`NSLinguisticTagOpenParenthesis`](/documentation/Foundation/NSLinguisticTag/openParenthesis)

This token is an open parenthesis.

[`NSLinguisticTagCloseParenthesis`](/documentation/Foundation/NSLinguisticTag/closeParenthesis)

This token is a close parenthesis.

[`NSLinguisticTagWordJoiner`](/documentation/Foundation/NSLinguisticTag/wordJoiner)

This token is a word joiner.

[`NSLinguisticTagDash`](/documentation/Foundation/NSLinguisticTag/dash)

This token is a dash.

[`NSLinguisticTagOtherPunctuation`](/documentation/Foundation/NSLinguisticTag/otherPunctuation)

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`](/documentation/Foundation/NSLinguisticTag/paragraphBreak)

This token is a paragraph break.

[`NSLinguisticTagOtherWhitespace`](/documentation/Foundation/NSLinguisticTag/otherWhitespace)

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`](/documentation/Foundation/NSLinguisticTagScheme/nameType)

Classifies tokens according to whether they are part of a named entity. or [`NSLinguisticTagSchemeNameTypeOrLexicalClass`](/documentation/Foundation/NSLinguisticTagScheme/nameTypeOrLexicalClass)

Classifies tokens corresponding to names according to [`nameType`](/documentation/Foundation/NSLinguisticTagScheme/nameType), and classifies all other tokens according to [`lexicalClass`](/documentation/Foundation/NSLinguisticTagScheme/lexicalClass). scheme. In Objective-C you may use pointer equality to compare the values with tag constants.

[`NSLinguisticTagPersonalName`](/documentation/Foundation/NSLinguisticTag/personalName)

This token is a personal name.

[`NSLinguisticTagOrganizationName`](/documentation/Foundation/NSLinguisticTag/organizationName)

This token is an organization name.

[`NSLinguisticTagPlaceName`](/documentation/Foundation/NSLinguisticTag/placeName)

This token is a place name.

## Relationships

### Conforms To

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

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

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

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

[`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)