A Flutter plugin of Analyze natural language text and deduce its language-specific metadata.
Finds the most likely language of a piece of text.
Future<String> getDominantLanguage(String text) async {
final result = await _naturalLanguage.getDominantLanguage(text) ?? "NULL";
return result;
}
Generates the probabilities of possible languages for the processed text.
Future<Map<String, double>> getLanguageHypotheses(String text, int withMaximum) async {
final result = await _naturalLanguage.getLanguageHypotheses(text, withMaximum);
return result;
}
Detects whether it is English.
Future<bool> isEnglish(String text, double threshold) async {
final result = await _naturalLanguage.isEnglish(text, threshold) ?? false;
return result;
}