fl_mlkit_identify_language 1.2.0 copy "fl_mlkit_identify_language: ^1.2.0" to clipboard
fl_mlkit_identify_language: ^1.2.0 copied to clipboard

Identify the language of text with ML Kit on Android And IOS

fl_mlkit_identify_language #

Identify the language of text with ML Kit on Android And IOS #

  • 如果调用成功,则会返回BCP-47语言代码 tag和confidence,如果没有检测到语言,则返回通过代码und(undetermined)。

  • If the call succeeds, a BCP-47 language code is passed to the success listener, indicating the language of the text. If no language is confidently detected, the code und(undetermined) is passed.

  • supported languages


void func() {
  FlMlKitIdentifyLanguage mlKitIdentifyLanguage = FlMlKitIdentifyLanguage();

  /// Identify language
  /// If the call succeeds, a BCP-47 language code is passed to the success listener,
  /// indicating the language of the text. If no language is confidently detected,
  /// the code und (undetermined) is passed.
  mlKitIdentifyLanguage.identifyLanguage('text');

  /// Identify possible languages
  mlKitIdentifyLanguage.identifyPossibleLanguages('text');

  /// Set confidence
  /// Confidence must >=0.01 and must <=1
  /// Before you set confidence, each identifyLanguage will use the previous confidence or the default 0.5
  mlKitIdentifyLanguage.setConfidence(0.75);

  /// Be sure to call this method when you are no longer using a collapsible
  mlKitIdentifyLanguage.dispose();
}

0
likes
160
points
39
downloads

Publisher

unverified uploader

Weekly Downloads

Identify the language of text with ML Kit on Android And IOS

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on fl_mlkit_identify_language