---
title: NLTagger
framework: naturallanguage
role: symbol
role_heading: Class
path: naturallanguage/nltagger
---

# NLTagger

A tagger that analyzes natural language text.

## Declaration

```swift
class NLTagger
```

## Mentioned in

Identifying people, places, and organizations Identifying parts of speech

## Overview

Overview NLTagger supports many different languages and scripts. Use it to segment natural language text into paragraph, sentence, or word units and to tag each unit with information like 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 NLTagScheme 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. important: Don’t use an instance of NLTagger simultaneously from multiple threads.

## Topics

### Creating a tagger

- [init(tagSchemes:)](naturallanguage/nltagger/init(tagschemes:).md)
- [string](naturallanguage/nltagger/string.md)

### Getting the tag schemes

- [availableTagSchemes(for:language:)](naturallanguage/nltagger/availabletagschemes(for:language:).md)
- [requestAssets(for:tagScheme:completionHandler:)](naturallanguage/nltagger/requestassets(for:tagscheme:completionhandler:).md)
- [NLTagger.AssetsResult](naturallanguage/nltagger/assetsresult.md)
- [tagSchemes](naturallanguage/nltagger/tagschemes.md)
- [NLTagScheme](naturallanguage/nltagscheme.md)

### Determining the dominant language and orthography

- [dominantLanguage](naturallanguage/nltagger/dominantlanguage.md)
- [setLanguage(_:range:)](naturallanguage/nltagger/setlanguage(_:range:).md)
- [setOrthography(_:range:)](naturallanguage/nltagger/setorthography(_:range:).md)

### Enumerating linguistic tags

- [enumerateTags(in:unit:scheme:options:using:)](naturallanguage/nltagger/enumeratetags(in:unit:scheme:options:using:).md)
- [NLTagger.Options](naturallanguage/nltagger/options.md)
- [NLTag](naturallanguage/nltag.md)

### Getting linguistic tags

- [tags(in:unit:scheme:options:)](naturallanguage/nltagger/tags(in:unit:scheme:options:).md)
- [tag(at:unit:scheme:)](naturallanguage/nltagger/tag(at:unit:scheme:).md)
- [tagHypotheses(at:unit:scheme:maximumCount:)](naturallanguage/nltagger/taghypotheses(at:unit:scheme:maximumcount:).md)

### Determining the range of a unit token

- [tokenRange(at:unit:)](naturallanguage/nltagger/tokenrange(at:unit:).md)
- [tokenRange(for:unit:)](naturallanguage/nltagger/tokenrange(for:unit:).md)
- [NLTokenUnit](naturallanguage/nltokenunit.md)

### Using models with a tagger

- [setModels(_:forTagScheme:)](naturallanguage/nltagger/setmodels(_:fortagscheme:).md)
- [models(forTagScheme:)](naturallanguage/nltagger/models(fortagscheme:).md)

### Using gazetteers with a tagger

- [setGazetteers(_:for:)](naturallanguage/nltagger/setgazetteers(_:for:).md)
- [gazetteers(for:)](naturallanguage/nltagger/gazetteers(for:).md)
- [NLGazetteer](naturallanguage/nlgazetteer.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

### Linguistic tags

- [Identifying parts of speech](naturallanguage/identifying-parts-of-speech.md)
- [Identifying people, places, and organizations](naturallanguage/identifying-people-places-and-organizations.md)
