---
title: NSLinguisticTagger
framework: foundation
role: symbol
role_heading: Class
path: foundation/nslinguistictagger
---

# NSLinguisticTagger

Analyze natural language text to tag part of speech and lexical class, identify names, perform lemmatization, and determine the language and script.

## Declaration

```swift
class NSLinguisticTagger
```

## Mentioned in

Tokenizing Natural Language Text Identifying Parts of Speech Identifying People, Places, and Organizations

## Overview

Overview NSLinguisticTagger provides a uniform interface to a variety of natural language processing functionality with support for many different languages and scripts. You can use this class to segment natural language text into paragraphs, sentences, or words, and tag information about those segments, such as part of speech, lexical class, lemma, script, and language. When you create a linguistic tagger, you specify what kind of information you’re interested in by passing one or more NSLinguisticTagScheme values. Set the string property to the natural language text you want to analyze, and the linguistic tagger processes it according to the specified tag schemes. You can then enumerate over the tags in a specified range, using the methods described in Enumerating Linguistic Tags, to get the information requested for a given scheme and unit. Thread Safety A single instance of NSLinguisticTagger should not be used simultaneously from multiple threads.

## Topics

### First Steps

- [Tokenizing Natural Language Text](foundation/tokenizing-natural-language-text.md)
- [init(tagSchemes:options:)](foundation/nslinguistictagger/init(tagschemes:options:).md)
- [string](foundation/nslinguistictagger/string.md)

### Getting the Tag Schemes

- [availableTagSchemes(for:language:)](foundation/nslinguistictagger/availabletagschemes(for:language:).md)
- [availableTagSchemes(forLanguage:)](foundation/nslinguistictagger/availabletagschemes(forlanguage:).md)
- [tagSchemes](foundation/nslinguistictagger/tagschemes.md)

### Determining the Dominant Language and Orthography

- [dominantLanguage(for:)](foundation/nslinguistictagger/dominantlanguage(for:).md)
- [dominantLanguage](foundation/nslinguistictagger/dominantlanguage.md)
- [orthography(at:effectiveRange:)](foundation/nslinguistictagger/orthography(at:effectiverange:).md)
- [setOrthography(_:range:)](foundation/nslinguistictagger/setorthography(_:range:).md)

### Enumerating Linguistic Tags

- [Identifying Parts of Speech](foundation/identifying-parts-of-speech.md)
- [Identifying People, Places, and Organizations](foundation/identifying-people-places-and-organizations.md)
- [enumerateTags(in:unit:scheme:options:using:)](foundation/nslinguistictagger/enumeratetags(in:unit:scheme:options:using:).md)
- [enumerateTags(in:scheme:options:using:)](foundation/nslinguistictagger/enumeratetags(in:scheme:options:using:).md)
- [enumerateTags(for:range:unit:scheme:options:orthography:using:)](foundation/nslinguistictagger/enumeratetags(for:range:unit:scheme:options:orthography:using:).md)
- [NSLinguisticTagger.Options](foundation/nslinguistictagger/options.md)

### Getting Linguistic Tags

- [tag(at:unit:scheme:tokenRange:)](foundation/nslinguistictagger/tag(at:unit:scheme:tokenrange:).md)
- [tag(at:scheme:tokenRange:sentenceRange:)](foundation/nslinguistictagger/tag(at:scheme:tokenrange:sentencerange:).md)
- [tag(for:at:unit:scheme:orthography:tokenRange:)](foundation/nslinguistictagger/tag(for:at:unit:scheme:orthography:tokenrange:).md)
- [tags(in:unit:scheme:options:tokenRanges:)](foundation/nslinguistictagger/tags(in:unit:scheme:options:tokenranges:).md)
- [tags(in:scheme:options:tokenRanges:)](foundation/nslinguistictagger/tags(in:scheme:options:tokenranges:).md)
- [tags(for:range:unit:scheme:options:orthography:tokenRanges:)](foundation/nslinguistictagger/tags(for:range:unit:scheme:options:orthography:tokenranges:).md)

### Determining the Range of a Unit Token

- [tokenRange(at:unit:)](foundation/nslinguistictagger/tokenrange(at:unit:).md)
- [sentenceRange(for:)](foundation/nslinguistictagger/sentencerange(for:).md)

### Determining the Possible Tags

- [possibleTags(at:scheme:tokenRange:sentenceRange:scores:)](foundation/nslinguistictagger/possibletags(at:scheme:tokenrange:sentencerange:scores:).md)

### Notifying for Changes to the Analyzed String

- [stringEdited(in:changeInLength:)](foundation/nslinguistictagger/stringedited(in:changeinlength:).md)

### Supporting Types

- [NSLinguisticTagScheme](foundation/nslinguistictagscheme.md)
- [NSLinguisticTaggerUnit](foundation/nslinguistictaggerunit.md)
- [NSLinguisticTag](foundation/nslinguistictag.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Deprecated

- [Deprecated String Encodings](foundation/1497268-deprecated-string-encodings.md)
