google_mlkit_entity_extraction 0.0.1 google_mlkit_entity_extraction: ^0.0.1 copied to clipboard
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 #
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.
Usage #
Entity Extraction #
Create an instance of EntityExtractor
final entityExtractor = EntityExtractor(language: EntityExtractorOptions.english);
Process text
final List<EntityAnnotation> annotations = await entityExtractor.extractEntities(text);
for (final annotation in annotations) {
}
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.