TextClassifierExecutor class
Executes MediaPipe's "classifyText" task.
{@macro TaskExecutor}
Constructors
- TextClassifierExecutor.new(TextClassifierOptions options)
- {macro TextClassifierExecutor}
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- options → TextClassifierOptions
-
Initialization values for the
worker
.finalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- taskName → String
-
Debug value for log statements.
final
-
worker
→ Pointer<
Void> -
The native MediaPipe object which will complete this task.
no setterinherited
Methods
-
classify(
String text) → TextClassifierResult -
Passes
text
to MediaPipe for classification, yielding a TextClassifierResult or throwing an exception. -
closeWorker(
Pointer< Void> worker, Pointer<Pointer< error) → intChar> > -
Releases the
worker
object behind this task. -
createResultsPointer(
) → Pointer< TextClassifierResult> - Allocates this task's results struct in native memory.
-
createWorker(
Pointer< TextClassifierOptions> options, Pointer<Pointer< error) → Pointer<Char> >Void> - Allocates this task's worker object in native memory.
-
dispose(
) → void -
Releases the
worker
and any remaining resources. After callingdispose
, re-using theworker
property will recreate the native object and will require a second call todispose
.inherited -
handleErrorMessage(
Pointer< Pointer< errorMessage, [int? status]) → voidChar> > -
Throws an exception if
errorMessage
is non-empty.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited