google_mlkit_entity_extraction 0.0.3 copy "google_mlkit_entity_extraction: ^0.0.3" to clipboard
google_mlkit_entity_extraction: ^0.0.3 copied to clipboard

outdated

A Flutter plugin to use Google's ML Kit Entity Extractor API to recognize specific entities within static text.

Google's ML Kit Entity Extraction API for Flutter #

Pub Version

A Flutter plugin to use Google's ML Kit Entity Extractor API to recognize specific entities within static text.

Getting Started #

Before you get started read about the requirements and known issues of this plugin here.

Supported languages #

Entity extraction supports the following languages:

  • Arabic
  • Portuguese
  • English (US, UK)
  • Dutch
  • French
  • German
  • Italian
  • Japanese
  • Korean
  • Polish
  • Russian
  • Chinese (Simplified, Traditional)
  • Spanish
  • Thai
  • Turkish

Usage #

Entity Extraction #

Create an instance of EntityExtractor

final entityExtractor = EntityExtractor(language: EntityExtractorOptions.english);

Process text

final List<EntityAnnotation> annotations = await entityExtractor.annotateText(text);

for (final annotation in annotations) {
  annotation.start
  annotation.end
  annotation.text
  for (final entity in annotation.entities) {
    entity.type
    entity.rawValue
  }
}

Release resources with close()

entityExtractor.close();

Managing remote models #

Create an instance of model manager

final modelManager = EntityExtractorModelManager();

Check if model is downloaded

final bool response = await modelManager.isModelDownloaded(model);

Download model

final bool response = await modelManager.downloadModel(model);

Delete model

final bool response = await modelManager.deleteModel(model);

Example app #

Find the example app here.

Contributing #

Contributions are welcome. In case of any problems look at existing issues, if you cannot find anything related to your problem then open an issue. Create an issue before opening a pull request for non trivial fixes. In case of trivial fixes open a pull request directly.

11
likes
0
pub points
89%
popularity

Publisher

verified publisherflutter-ml.dev

A Flutter plugin to use Google's ML Kit Entity Extractor API to recognize specific entities within static text.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, google_mlkit_commons

More

Packages that depend on google_mlkit_entity_extraction