---
title: dominantLanguage
framework: naturallanguage
role: symbol
role_heading: Instance Property
path: naturallanguage/nltagger/dominantlanguage
---

# dominantLanguage

The dominant language of the string set for the linguistic tagger.

## Declaration

```swift
var dominantLanguage: NLLanguage? { get }
```

## Discussion

Discussion If you want to know the dominant language of a string that you’re analyzing with a linguistic tagger (for example, identifying part of speech for each word), specify the language tag scheme in the initializer. After you set the string property of the linguistic tagger, the dominant language can be determined with the dominantLanguage property, as shown in this example: let text = "Die Kleinen haben friedlich zusammen gespielt." let tagger = NLTagger(tagSchemes: [.language], options: 0) tagger.string = text tagger.dominantLanguage // NLLanguage.german In the example, german is the dominant language, indicating that the text is in German.

## See Also

### Determining the dominant language and orthography

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