BaseLanguageDetector class abstract
Predicts the language of an input text.
Usage:
final options = LanguageDetectorOptions(); // optional parameters
final detector = LanguageDetector(options);
final result = await detector.detect('¿Como estas?')
print(result.predictions.first.languageCode);
> "es"
detector.dispose();
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
detect(
String text) → Future< BaseLanguageDetectorResult> - Sends a String value to MediaPipe for language detection.
-
dispose(
) → void - Cleans up all resources.
-
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