LanguageIdentifier class
A class that identifies the main language or possible languages for the given text.
Constructors
- LanguageIdentifier({required double confidenceThreshold})
- Constructor to create an instance of IdentifiedLanguage.
Properties
- confidenceThreshold → double
-
The confidence threshold for language identification.
The identified languages will have a confidence higher or equal to the confidence threshold.
The value should be between 0 and 1.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Instance id.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- undeterminedLanguageCode → String
-
This code is returned when no language could be determined.
final
Methods
-
close(
) → Future< void> - Closes the identifier and releases its resources.
-
identifyLanguage(
String text) → Future< String> -
Identifies the language of the given
text
. If no language could be determined then undeterminedLanguageCode is returned. More information: https://developers.google.com/ml-kit/language/identification -
identifyPossibleLanguages(
String text) → Future< List< IdentifiedLanguage> > -
Identifies the possible languages of the given
text
. If no language could be determined then undeterminedLanguageCode is returned. More information: https://developers.google.com/ml-kit/language/identification -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited