learning_language 0.0.2 copy "learning_language: ^0.0.2" to clipboard
learning_language: ^0.0.2 copied to clipboard

outdated

The easy way to use ML Kit for identifying languages in Flutter.

ML Language #

The easy way to use ML Kit for identifying languages in Flutter.

With ML Kit's on-device language identification, we can determine the language of a string of text. Language identification can be useful when working with user-provided text, which often doesn't come with any language information.

Getting Started #

Add dependency to your flutter project:

$ flutter pub add learning_language

or

dependencies:
  learning_language: ^0.0.2

Then run flutter pub get.

Usage #

import 'package:learning_language/learning_language.dart';

Identify Language #

String text = 'Baby, you light up my world like nobody else';
LanguageIdentifier identifier = LanguageIdentifier();
String language = await identifier.identify(text);
print(language);

Identify Possible Languages #

String text = 'Baby, you light up my world like nobody else';
LanguageIdentifier identifier = LanguageIdentifier();
List<IdentifiedLanguage> possibleLanguages = await identifier.idenfityPossibleLanguages(text);

print('Possible Languages:');
print(possibleLanguages);

Dispose #

identifier.dispose();

Example Project #

You can learn more from example project here.

10
likes
0
points
54
downloads

Publisher

unverified uploader

Weekly Downloads

The easy way to use ML Kit for identifying languages in Flutter.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on learning_language