Under the hood

A tiny local decision path

No translation service and no generative model. Upyr remaps the exact physical keys, then asks whether the other-layout candidate is clearly more plausible.

  1. 01

    Capture positions

    The native hook keeps a bounded in-memory prefix for the current input boundary.

  2. 02

    Remap keys

    Installed EN and UK input sources produce the opposite-layout candidate, case and punctuation included.

  3. 03

    Score evidence

    Dictionaries, technical guards, exceptions, and the signed character n-gram index compare both readings.

  4. 04

    Apply carefully

    Only a candidate above the selected confidence threshold replaces text and switches the input source.

SIGNED N-GRAM v1

Character patterns, packed small

Equal-size English and Ukrainian news corpora are filtered by alphabet and split into 2–5-character sequences. Each retained sequence becomes a packed key plus one signed confidence byte: negative for English, positive for Ukrainian.

The app embeds no corpus sentences and no word-frequency table—only 173,964 n-gram records in about 2.8 MiB. Lookup is local, deterministic, and immediate.

Read the frozen evaluation
LOCAL TRACE

Follow one correction

  1. 01Map the physical keys

    The same six key positions produce a candidate on the Ukrainian layout.

    gп hр bи dв sі nт
    ghbdsnпривіт
  2. 02Extract overlapping grams

    Add word boundaries and inspect every 2–5-character window. Longer grams receive more weight.

    ^привіт$22 overlapping grams
    n2^ппррииввіітт$
    n3^прприрививівітіт$
    n4^припривривіивітвіт$
    n5^привпривіривітивіт$
  3. 03Compare local evidence

    Packed signed records are found with binary search; longer grams are weighted before the sum is normalized.

    ^g−112 ghb−83 sn$−63 ^п+127 при+116 ивіт$+43
    ghbdsnEN · 0.209
    привітУК · 0.704
    Model coverage · not probability+0.495
  4. 04Make the guarded decision

    “привіт” is known; “ghbdsn” is not. The model agrees, and the policy permits correction.

    ghbdsnunknown привітknown word
    CORRECTпривіт

Public preview

Keep typing. Upyr will flip the rest.

The current macOS preview is ad-hoc signed and not Apple-notarized, so Gatekeeper may block it. You can also inspect and build every line yourself.