FutoSwipeEngine class final

Platform-independent FUTO Swipe inference and decoding.

Native code runs this engine in a worker isolate. The Web runs it on the page thread and runs ONNX graphs in a Web Worker.

Properties

contextWeights → FutoScoringWeights
final
decoderWeights → FutoScoringWeights
final
hashCode → int
The hash code for this object.
no setterinherited
lexiconSize → int
Swipeable lexicon spellings, after search-key filtering.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → Future<void>
decode(List<FutoSwipePoint> trace, FutoSwipeLayout layout, {List<String>? previousWords, required int maxCandidates}) → Future<List<FutoSwipeCandidate>>
Ranks lexicon words for trace.
emissions(List<FutoSwipePoint> trace, FutoSwipeLayout layout) → Future<FutoSwipeEmissions>
Runs the encoder and paired English decoder.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
predictNextWords(List<String> previousWords, int count) → Future<List<FutoWordScore>>
Highest-scoring exact-vocabulary words after previousWords.
scoreWords(List<String> previousWords, List<String> words) → Future<List<double>>
ContextLM scores for words after previousWords.
setLexicon(List<FutoSwipeWord> lexicon, {required bool includeModelVocabulary}) → void
Replaces all swipe words. Model vocabulary words are added first.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

create({required FutoSwipeOnnxBackend backend, required List<String> vocabulary, required Map<String, dynamic> scoring, required List<FutoSwipeWord> lexicon, required bool includeModelVocabulary, required int beamWidth}) → Future<FutoSwipeEngine>