Skip to main content

mediapipe_text 0.1.3 copy "mediapipe_text: ^0.1.3" to clipboard
mediapipe_text: ^0.1.3 copied to clipboard

Google's MediaPipe text tasks for Flutter: text classification and embeddings, language detection, EmbeddingGemma, proofreading and summarization.

0.1.3 #

  • The README has an installation section using flutter pub add.
  • With mediapipe_core 0.1.3, downloads of models and native libraries wait out short network failures.

0.1.2 #

Release 0.1.2.

0.1.1 #

Adds Google's NOTICE at the package root.

0.1.0 #

The first release of this rewrite, replacing Google's mediapipe_text 0.0.1 (May 2024) with a new API; MIGRATION.md maps it.

  • Text Classifier, Text Embedder and Language Detector on Android, iOS, macOS, Linux, Windows and the web, through Google's official runtimes.
  • On 32-bit Android (armeabi-v7a) the Text Classifier, Text Embedder and Language Detector run on the CPU; EmbeddingGemma, the Proofreader and the Summarizer need 64-bit Android, since their models take more memory than a 32-bit process holds.
  • EmbeddingGemma, as a TextEmbedder with TextModels.embeddingGemma, on the same six platforms, with Google's prompt formatting on every runtime: embed(text, {formatContext}) with EmbeddingType, TextRole and TextFormatContext.
  • Proofreader and Summarizer on Android, iOS, macOS, Linux and Windows, with streamed updates (proofreadStream, summarizeStream). Browsers have neither task (upstream-issues.md UP-034), which the capability queries report.
  • Every task is one class with the same API on every platform, created with await Xxx.create(options) and released with an idempotent dispose(). mediapipe_text.dart is the only app library.
  • Options are flat on core's TaskOptions (model, modelPath, modelBytes, delegate) with Google's settings. Results are plain values on core's Classifications, Embedding and MediaPipeCategory, and TextEmbedder.cosineSimilarity is static.
  • Per-task capability queries (queryTextClassifierCapabilities() and the others) report the supported delegates and why any other is unavailable. Invalid classifier settings fail in Dart on every platform, and create refuses the GPU, which no text task runs on.
  • TextModels.byName names every pinned model for hooks.user_defines.mediapipe_text.models, which dart run mediapipe_core:bundle_models bundles into the app. model: uses the bundled copy and downloads at run time only when ModelStore.allowDownloads is true; app-supplied paths and bytes work too.
5
likes
160
points
351
downloads

Documentation

API reference

Publisher

verified publishergoogle.dev

Weekly Downloads

Google's MediaPipe text tasks for Flutter: text classification and embeddings, language detection, EmbeddingGemma, proofreading and summarization.

Repository (GitHub)
View/report issues
Contributing

Topics

#mediapipe #machine-learning #nlp #text-classification #embeddings

License

BSD-3-Clause (license)

Dependencies

code_assets, ffi, flutter, flutter_web_plugins, hooks, mediapipe_core, meta, native_toolchain_c

More

Packages that depend on mediapipe_text

Packages that implement mediapipe_text