tasks-text package

Classes

ClassDescription
FilesetResolverResolves the files required for the MediaPipe Task APIs.This class verifies whether SIMD is supported in the current environment and loads the SIMD files only if support is detected. The returned filesets require that the Wasm files are published without renaming. If this is not possible, you can invoke the MediaPipe Tasks APIs using a manually created WasmFileset.
LanguageDetectorPredicts the language of an input text.
TextClassifierPerforms Natural Language classification.
TextEmbedderPerforms embedding extraction on text.

Interfaces

InterfaceDescription
CategoryA classification category.
ClassificationsClassification results for a given classifier head.
EmbeddingList of embeddings with an optional timestamp.One and only one of the two 'floatEmbedding' and 'quantizedEmbedding' will contain data, based on whether or not the embedder was configured to perform scalar quantization.
LanguageDetectorOptionsOptions to configure the MediaPipe Language Detector Task
LanguageDetectorPredictionA language code and its probability.
LanguageDetectorResultThe result of language detection.
TextClassifierOptionsOptions to configure the MediaPipe Text Classifier Task
TextClassifierResultClassification results of a model.
TextEmbedderOptionsOptions to configure the MediaPipe Text Embedder Task
TextEmbedderResultEmbedding results for a given embedder model.