Skip to content

[Epic] B7: Multi-part fake-track synthesis (tap→swipe / swipe→swipe quality) #97

@AsafMah

Description

@AsafMah

Epic. Make multi-part word composition (tap→swipe, swipe→swipe) reliable by synthesizing a merged gesture track that looks like one plausible whole-word swipe to the native recognizer — without replacing the decoder. Sub-epic of #15.

Context

Today WordComposer.setBatchInputPointers() prepends the prior fragment's raw trail, uniformly re-timed (25 ms/point, 60 ms gap), then appends the current stroke (docs/TWO_THUMB_TYPING_INTERNALS.md §4.5). That fixed time discontinuity but not geometry pollution:

  • tap prefixes are sparse (a lone point, not stroke-like) → tap→swipe is weak;
  • noisy/partial prior swipe trails hurt;
  • fixed 25/60 ms timing is wrong for many key distances;
  • the prefix→suffix connector can cross unrelated keys → hallucinated letters (techcolony).

The decoder-replacement path (custom SHARK² decoder) was ruled out on quality — we stay on Google's decoder and attack the track synthesis instead.

Key insight

For composition we know more than the lib does: the composing prefix text, the keyboard geometry, and the real suffix stroke. So build a clean synthetic prefix path through key centers, join it to the real suffix with an adaptive, distance-aware connector (near-invisible for large jumps), and strip the prefix if the lib returns the whole word.

Acceptance (whole epic)

Measured top-1 / top-3 improvement on the §5 multi-part combos in the golden corpus (#21) for tap→swipe and swipe→swipe, with no regression on single-swipe and silo/technology-class cases. Decide by data, not by hand (A/B each step).

Issues (recommended order)

Related

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions