Analyzes the piece of text to determine its dominant language.
On This Page
func processString(_ string: String)
Use this method to process the provided text and to update the dominantLanguage result and languageHypotheses(withMaximum:) probabilities.
class func dominantLanguage(for: String) -> NLLanguage?
Finds the most likely language of a piece of text.
var dominantLanguage: NLLanguage?
The most likely language for the processed text.
func languageHypotheses(withMaximum: Int) -> [NLLanguage : Double]
Generates the probabilities of possible languages for the processed text.
Resets the recognizer to its initial state.
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.