How Imla works

Imla is not an opaque model. It runs on published data and stated rules, and every number below is read from the index that actually ships.

441,161 wordsEdit distance ≤2

Four steps

While you type, a check runs at most once every 320 milliseconds. Each run goes through the same four steps.

  1. 1

    Tokenize

    The text is split into words on Uyghur letter boundaries. URLs, email addresses and numbers are skipped; a hyphen between two Uyghur letters counts as part of the word.

  2. 2

    Normalize to NFC

    Each word is normalized to NFC for lookup only. Nothing is trimmed, case-folded, transliterated or stripped, so the text you typed is the text that stays in the editor.

  3. 3

    Look up rules, then the dictionary

    The explicit correction table is consulted first. If the word is not listed there, dictionary membership decides whether it is flagged.

  4. 4

    Generate suggestions

    For a flagged word, near-matches are read out of a prebuilt index and the best five are ranked and returned.

Dictionary and rules

Two datasets drive the checker. The first is a frequency dictionary of 441,161 words, each with the number of times it occurs in the source corpus. The second is a table of 3,394 explicit misspelling → correction pairs.

Explicit rules always win. A word can be present in the dictionary and still be corrected, because the table says a different form was meant.

Lookup does not scan the dictionary. A build step precomputes a delete index: every word plus the variants produced by deleting up to two characters, keyed for constant-time retrieval. That index holds 1,320,730 keys and 12,133,323 postings, so a candidate set is fetched rather than searched for.

How suggestions rank

Candidates are ordered by four keys, applied in sequence:

  1. Explicit status — a correction from the table outranks everything else.
  2. Edit distance — one edit beats two.
  3. Corpus frequency — the more common word wins a tie.
  4. Uyghur alphabet order — a final deterministic tiebreaker.

Distance is Damerau–Levenshtein: insertion, deletion, substitution and the transposition of two adjacent letters. Words of four characters or fewer allow only a single edit, because a two-edit radius on a short word returns mostly noise.

The same word always produces the same suggestions in the same order. Nothing here is sampled or randomized, so results are reproducible.

Privacy and limits

Only individual words go to the server, batched at most 128 at a time. Sentence structure, whole documents and the text as a unit are never transmitted or retained. Opening a TXT, RTF or DOCX file happens entirely in the browser, with no upload.

The limit is equally clear: this is not a grammar checker. Each word is judged on its own, so a correctly spelled word used incorrectly in a sentence will not be flagged.