The language of a body of text.
SDKs
- iOS 12.0+
- macOS 10.14+
- tvOS 12.0+
- watchOS 5.0+
Framework
- Natural Language
Declaration
class NLLanguageRecognizer : NSObject
Overview
The identification obtained from an NLLanguage
object can be either a single most likely language, access through dominant
, or a set of language candidates with probabilities, using language
. You can reset the recognizer to its initial state, to be reused for new analysis.
Use the convenience method, dominant
, to get the most likely language without creating an NLLanguage
.
Important
Don't use an instance of NLLanguage
from more than one thread simultaneously.