The dominant language of the string set for the linguistic tagger.
- iOS 12.0+
- macOS 10.14+
- UIKit for Mac 13.0+Beta
- tvOS 12.0+
- watchOS 5.0+
- Natural Language
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
dominant property, as shown in this example:
In the example,
german is the dominant language, indicating that the text is in German.