X-Git-Url: https://git.cworth.org/git?p=lmno-server;a=blobdiff_plain;f=lmno.js;h=c2942a419446562c0da4a0b11ec23318828ef002;hp=71ccc58165298b3e313fa7f60e0422fb19e3b7b6;hb=3d164c48d0b979afdd83f58af9bb47e7c89c1877;hpb=2a7c76574f343ce95f7100b62b7d42842afaa6da diff --git a/lmno.js b/lmno.js index 71ccc58..c2942a4 100644 --- a/lmno.js +++ b/lmno.js @@ -128,10 +128,10 @@ class LMNO { * 1. Vowels (AEIOU) to avoid accidentally spelling an unfortunate word * 2. Lowercase letters (replace with corresponding capital on input) * 3. N (replace with M on input) - * 4. P (replace with B on input) - * 5. S (replace with F on input) + * 4. B (replace with P on input) + * 5. F,X (replace with S on input) */ -LMNO.letters = "BCDFGHJKLMQRTVWXYZ"; +LMNO.letters = "CCDDDGGGHHJKLLLLMMMMPPPPQRRRSSSTTTVVWWYYZ"; const lmno = new LMNO(); @@ -142,8 +142,9 @@ function lmno_canonize(id) { /* Replace unused letters with nearest phonetic match. */ id = id.replace(/N/g, 'M'); - id = id.replace(/P/g, 'B'); - id = id.replace(/S/g, 'F'); + id = id.replace(/B/g, 'P'); + id = id.replace(/F/g, 'S'); + id = id.replace(/X/g, 'S'); /* Replace unused numbers nearest visual match. */ id = id.replace(/0/g, 'O');