xsznix / keygen

An(other) algorithm for generating optimal keyboard layouts.
107 stars 38 forks source link

Which corpus was used for the results in the blog post? #3

Closed hasufell closed 3 years ago

hasufell commented 3 years ago

I'm looking at https://xsznix.wordpress.com/2016/05/16/introducing-the-rsthd-layout/ especially the image: https://xsznix.files.wordpress.com/2016/05/screen-shot-2016-05-17-at-11-21-09.png

And whenever I run the evaluation myself, I get quite different results:

$ cargo run -- run-ref corpus/books.short.txt                                                                                     366ms  Sat 20:53
    Finished dev [optimized + debuginfo] target(s) in 0.01s
     Running `target/debug/keygen run-ref corpus/books.short.txt`
Reference: QWERTY
q w e r t | y u i o p -
a s d f g | h j k l ; '
z x c v b | n m , . /
         |
total: 5262350.875; scaled: 1.7690982722017619
base: 3255646  /  t: 609156; n: 389672.5; e: 272982; h: 211929; r: 180207;
same finger: 776140  /  ed: 107595; un: 66790; de: 49385; rt: 48070; tr: 46840;
long jump hand: 197021  /  in: 40205; on: 21898; ve: 15038; be: 11513; no: 10805;
long jump: 348040  /  ce: 76180; un: 66790; my: 44290; ec: 41740; mu: 22880;
long jump consecutive: 49490  /  ct: 13990; ex: 9790; cr: 9760; o,: 5555; xt: 3165;
pinky/ring twist: 45140  /  pl: 29570; p.: 3810; lp: 3710; -l: 2070; .-: 2020;
roll reversal: 58740  /  eas: 25100; cas: 9920; I'l: 4980; opi: 3280; sad: 2260;
same hand: 130883  /   you: 3627.5;  in : 3549.5; you : 2207.5;  him: 1829.5;  my : 1625;
alternating hand: 269495.5  /   the: 15117; the : 11312.5; and : 10199.5;  and: 9787.5;  tha: 4055;
roll out: 40460.875  /  re: 3399.375; hi: 2489.625; te: 1935.625; ve: 1879.75; wa: 1785.5;
roll in: -70664.5  /  in: -5025.625; , : -5002.5; er: -4440; n : -3959.875; ou: -3636.25;
long jump sandwich: 161259  /  ver: 17826; e c: 11967; but: 8421; , I: 6462; t b: 5577;
twist: 700  /  -kn: 300; nk-: 180; il?: 90; ul?: 90; nko: 20;

Reference: DVORAK
' , . p y | f g c r l /
a o e u i | d h t n s -
; q j k x | b m w v z
         |
total: 2886102.875; scaled: 0.9702506979941807
base: 2155109  /  l: 265701; i: 204018; d: 160494; y: 142581; f: 137799;
same finger: 332725  /  gh: 34610; ki: 27690; e.: 25295; pi: 20610; up: 17845;
long jump hand: 16912  /  bl: 3784; br: 2028; rm: 1415; Mr: 1188; k,: 1090;
long jump: 17570  /  xp: 6150; rv: 5740; ky: 2010; mf: 1690; zl: 560;
long jump consecutive: 7690  /  wr: 3485; lv: 2010; rw: 1165; wf: 660; "Q: 150;
pinky/ring twist: 28680  /  nl: 13120; lv: 4020; "O: 3360; o': 3130; n?: 2740;
roll reversal: 47060  /  rst: 17780; nst: 13480; nsw: 7740; nsc: 3640; ea,: 1160;
same hand: 67944  /  d th: 3103.5; n th: 2843.5; t th: 2483; nd t: 2171; f th: 1864;
alternating hand: 210690  /  , an: 5230.5; ere : 2275; here: 2119; ave : 1634; have: 1477;
roll out: 20407.625  /  ea: 1699.75; yo: 986.25; e,: 981.125; ke: 958.875; pe: 739.875;
roll in: -71652.75  /  th: -7546.875; d : -7299.625; t : -6665.75; s : -5074.75; nd: -4083.75;
long jump sandwich: 49278  /  ver: 17826; f m: 2511; bef: 2499; beg: 2103; mig: 1902;
twist: 3690  /  ke,: 1880; btl: 470; mnl: 330; rtm: 230; wn?: 160;

Reference: COLEMAK
q w f p g | j l u y ; -
a r s t d | h n e i o '
z x c v b | k m , . /
         |
total: 2999968.25; scaled: 1.008529984754227
base: 1868380  /  h: 211929; d: 160494; g: 142815; l: 132850.5; a: 91774;
same finger: 192140  /  e,: 39245; kn: 25540; nk: 18110; y.: 10305; ?": 9080;
long jump hand: 22018  /  my: 4429; y,: 3536; mu: 2288; y.: 2061; l,: 1647;
long jump: 42910  /  y.: 20610; lk: 8080; u,: 5070; lm: 3820; kl: 2490;
long jump consecutive: 25055  /  y,: 17680; xp: 3075; u.: 1590; y?: 1340; .-: 1010;
pinky/ring twist: 5250  /  .-: 2020; -I: 1410; -i: 810; xq: 330; I-: 220;
roll reversal: 421300  /  was: 165360; you: 155240; You: 24380; iou: 14120; car: 13720;
same hand: 155317.5  /   you: 3627.5;  in : 3549.5;  he : 2734.5; you : 2207.5;  him: 1829.5;
alternating hand: 249243.5  /  and : 10199.5;  and: 9787.5;  tha: 4055; d th: 3103.5; t th: 2483;
roll out: 46046.875  /  he: 7694.625; hi: 2489.625; me: 2163.625; wa: 1785.5; le: 1709.375;
roll in: -78894.625  /  e : -10680.125; in: -5025.625; , : -5002.5; n : -3959.875; ou: -3636.25;
long jump sandwich: 42162  /  lik: 4092; fac: 2373; beg: 2103; giv: 1821; mil: 1776;
twist: 9040  /  le.: 4580; key: 1460; me;: 1450; me-: 560; le?: 370;

Reference: QGMLWY
q g m l w | y f u b ; -
d s t n r | i a e o h '
z x c v j | k p , . /
         |
total: 3098157; scaled: 1.0415391002808785
base: 1927780.5  /  i: 204018; r: 180207; w: 173013; y: 142581; l: 132850.5;
same finger: 709525  /  ai: 92120; ay: 72690; ki: 41535; e,: 39245; if: 35740;
long jump hand: 17757  /  up: 3569; y,: 3536; y.: 2061; cl: 1804; pu: 1412;
long jump: 17770  /  u,: 5070; lv: 4020; py: 2460; ky: 2010; yp: 1690;
long jump consecutive: 12735  /  cl: 9020; u.: 1590; .-: 1010; Cl: 420; b,: 285;
pinky/ring twist: 8920  /  o-: 2540; .-: 2020; -o: 1400; o;: 1070; sq: 1040;
roll reversal: 8920  /  Oh,: 4420; eho: 2040; e-b: 860; oh,: 720; ohe: 220;
same hand: 116146  /   of : 5403;  you: 3627.5;  he : 2734.5; you : 2207.5; e of: 1335.5;
alternating hand: 279209.5  /   was: 3919.5; was : 3584; d th: 3103.5; n th: 2843.5; t th: 2483;
roll out: 25358.5  /  nd: 4083.75; ng: 2612.75; nt: 1389.875; fo: 1015.25; ld: 993.875;
roll in: -70529.5  /  e : -10680.125; he: -7694.625; , : -5002.5; ou: -3636.25; ha: -3357.75;
long jump sandwich: 41775  /  com: 8121; . B: 2802; cam: 2580; muc: 2310; y p: 1866;
twist: 2790  /  fe.: 1500; ye.: 280; ke-: 240; pe;: 110; pe-: 110;

Reference: WORKMAN
q d r w b | j f u p ; -
a s h t g | y n e o i '
z x m c v | k l , . /
         |
total: 2824789.125; scaled: 0.949638228061299
base: 1748068  /  l: 132850.5; r: 120138; d: 106996; b: 96960; a: 91774;
same finger: 357685  /  ly: 65280; e,: 39245; kn: 25540; ny: 20810; po: 18325;
long jump hand: 27848  /  ul: 7587; pl: 2957; cr: 1952; lf: 1885; rm: 1415;
long jump: 67590  /  lf: 18850; rm: 14150; Mr: 11880; fl: 10610; u,: 5070;
long jump consecutive: 13890  /  mb: 6145; p,: 3575; u.: 1590; .-: 1010; dm: 775;
pinky/ring twist: 8920  /  o-: 2540; .-: 2020; -o: 1400; o;: 1070; sq: 1040;
roll reversal: 178620  /  had: 95300; mad: 19360; has: 16440; dar: 8560; sam: 6960;
same hand: 142023.5  /   of : 5403; that: 4015.5;  you: 3627.5;  in : 3549.5; you : 2207.5;
alternating hand: 250793  /  and : 10199.5;  and: 9787.5; his : 2986.5;  his: 2260.5;  wit: 2257.5;
roll out: 46211.25  /  th: 7546.875; ha: 3357.75; wa: 1785.5; le: 1709.375; ne: 1508.125;
roll in: -80169.625  /  e : -10680.125; in: -5025.625; , : -5002.5; n : -3959.875; ou: -3636.25;
long jump sandwich: 55920  /  rom: 5496; mor: 5229; ful: 4242; r m: 3504; bac: 2883;
twist: 7390  /  kep: 2100; fe.: 1500; pel: 1070; lep: 720; le-: 680;

Reference: MALTRON
q p y c b | v m u z l =
a n i s f | d t h o r '
, . j g / | ; w k - x
        e |
total: 2438346.625; scaled: 0.8197239035902366
base: 1774648.5  /  l: 265701; d: 160494; b: 96960; a: 91774; ,: 91668;
same finger: 98010  /  n.: 9960; hu: 7265; sc: 7015; tw: 6100; rl: 6000;
long jump hand: 11064  /  y,: 3536; y.: 2061; lk: 808; p,: 715; lw: 591;
long jump: 7790  /  p.: 3810; uk: 1760; m;: 1260; P.: 250; m:: 130;
long jump consecutive: 17270  /  y.: 10305; p,: 3575; -l: 1035; -m: 845; l-: 715;
pinky/ring twist: 137570  /  lo: 79060; ol: 45620; Lo: 7100; -l: 2070; l-: 1430;
roll reversal: 61080  /  hro: 15880; ian: 14060; ork: 11140; pai: 8160; olu: 3220;
same hand: 133608.5  /   to : 6649.5; d th: 3103.5; t th: 2483; ould: 2370; uld : 1793;
alternating hand: 197120.5  /  ere : 2275; here: 2119; he s: 1903.5; ave : 1634; have: 1477;
roll out: 39093  /  th: 7546.875; in: 5025.625; to: 2750.375; or: 2301.125; ho: 1239.875;
roll in: -75151.875  /  d : -7299.625; t : -6665.75; an: -4981.125; ou: -3636.25; r : -2958.125;
long jump sandwich: 20934  /  beg: 2103; m w: 1677; g b: 1449; uck: 1443; . P: 1254;
twist: 15310  /  low: 13530; wol: 900; pig: 470; Pig: 130; gip: 80;

Reference: MTGAP
y p o u - | b d l c k j
i n e a , | m h t s r v
( " ' . _ | ) f w g x
        z |
total: 2399011.375; scaled: 0.8065001706114614
base: 1846372.5  /  o: 179775; d: 160494; y: 142581; u: 99888; b: 96960;
same finger: 144135  /  mb: 18435; tl: 13750; au: 8525; rk: 7165; sc: 7015;
long jump hand: 13885  /  y.: 2061; lf: 1885; gl: 1109; fl: 1061; "Y: 715;
long jump: 23090  /  lw: 5910; wl: 3930; u.: 3180; o': 3130; .-: 2020;
long jump consecutive: 18080  /  gl: 5545; "Y: 3575; xc: 1750; "O: 1680; y?: 1340;
pinky/ring twist: 52630  /  ny: 20810; sk: 11450; ks: 7980; "Y: 7150; y?: 2680;
roll reversal: 71700  /  oin: 23040; ein: 13180; "Yo: 9220; pie: 5600; "Ye: 4840;
same hand: 53389  /  d th: 3103.5; t th: 2483; f th: 1864; s th: 1432; ght : 1360.5;
alternating hand: 183797  /  ere : 2275; here: 2119; ave : 1634; have: 1477; ever: 1370.5;
roll out: 25492.375  /  an: 4981.125; on: 2737.25; en: 2640.75; ai: 1151.5; ay: 908.625;
roll in: -74854.5  /  th: -7546.875; d : -7299.625; t : -6665.75; s : -5074.75; in: -5025.625;
long jump sandwich: 40215  /  d f: 5325; low: 4059; on': 3747; wil: 3372; bef: 2499;
twist: 1080  /  pe.: 500; ye.: 280; ctf: 110; yn': 90; ue?: 50;

Reference: CAPEWELL
. y w d f | j p l u q /
a e r s g | b t n i o -
x z c v ; | k w h , '
         |
total: 2811236.75; scaled: 0.9450821876591603
base: 1867806  /  h: 211929; d: 160494; f: 137799; e: 136491; a: 91774;
same finger: 159825  /  ey: 19440; gs: 11890; ds: 10505; ye: 10235; cr: 9760;
long jump hand: 13172  /  ?": 1816; l,: 1647; hu: 1453; lk: 808; p,: 715;
long jump: 33710  /  ?": 18160; u,: 5070; d;: 2970; ?': 1790; dv: 1560;
long jump consecutive: 21560  /  l,: 8235; hu: 7265; cy: 2510; u': 1730; Hu: 795;
pinky/ring twist: 51550  /  e.: 50590; iq: 270; E.: 220; I?: 200; z.: 130;
roll reversal: 286180  /  ear: 76560; hou: 70140; ion: 69940; eac: 8760; nou: 8460;
same hand: 203304.5  /   to : 6649.5;  in : 3549.5; n th: 2843.5; t th: 2483; with: 2424;
alternating hand: 154783.5  /  and : 10199.5;  and: 9787.5;  for: 2416.5; for : 1939.5; he s: 1903.5;
roll out: 54107.625  /  th: 7546.875; re: 3399.375; to: 2750.375; hi: 2489.625; ve: 1879.75;
roll in: -75915.875  /  t : -6665.75; in: -5025.625; , : -5002.5; er: -4440; n : -3959.875;
long jump sandwich: 30234  /  hal: 3204; hil: 2730; ved: 2277; hol: 2061; hel: 1947;
twist: 10920  /  ce.: 6380; ve.: 1330; unk: 1290; xed: 1250; unw: 250;

Reference: ARENSITO
q l , p  |  f u d k
a r e n b | g s i t o
z w . h j | v c y m x
         |
total: 2431063.75; scaled: 0.8172755450742034
base: 1714782  /  h: 211929; m: 115986; w: 115342; d: 106996; t: 101526;
same finger: 151645  /  e,: 39245; e.: 25295; ok: 19650; gs: 11890; ui: 8225;
long jump hand: 20648  /  ck: 4524; uc: 2912; mu: 2288; dy: 1655; cu: 1423;
long jump: 17480  /  lw: 5910; ph: 4820; wl: 3930; dm: 1550; uy: 400;
long jump consecutive: 37960  /  mu: 11440; dy: 8275; um: 7105; w,: 4960; l.: 4125;
pinky/ring twist: 260  /  km: 120; rq: 100; kt: 30; tk: 10;
roll reversal: 121000  /  ear: 76560; eal: 15440; mou: 8360; dou: 5100; tou: 4480;
same hand: 165880.5  /   to : 6649.5;  of : 5403;  you: 3627.5;  it : 2414.5; you : 2207.5;
alternating hand: 128428.5  /  thin: 1950; ave : 1634; hing: 1629; know: 890.5; ed, : 874;
roll out: 54585.125  /  he: 7694.625; er: 4440; ha: 3357.75; to: 2750.375; it: 2501.375;
roll in: -78214.375  /  d : -7299.625; t : -6665.75; s : -5074.75; an: -4981.125; ou: -3636.25;
long jump sandwich: 77769  /  you: 23286; d m: 7284; low: 4059; You: 3657; wil: 3372;
twist: 18840  /  hel: 6490; Hel: 3200; vid: 2320; fix: 1510; cid: 1450;

Reference: BLAKE
q h o u x | g c r f z
y i e a ; | m s t n b
j , . k / | w d l p v
         |
total: 2594267.375; scaled: 0.872141375548604
base: 1885361.5  /  o: 179775; d: 160494; w: 144177.5; g: 142815; h: 141286;
same finger: 338415  /  hi: 99585; e.: 25295; rt: 24035; tr: 23420; ak: 15035;
long jump hand: 32270  /  ok: 3930; rd: 3835; pr: 3094; lf: 1885; dr: 1845;
long jump: 41220  /  h,: 12200; rl: 12000; o.: 5510; dg: 4920; uk: 1760;
long jump consecutive: 44990  /  pr: 15470; lf: 9425; o,: 5555; fl: 5305; h.: 2790;
pinky/ring twist: 410  /  iq: 270; nz: 130; zn: 10;
roll reversal: 6420  /  ey,: 2640; oy,: 2220; oyi: 480; hy.: 360; eyi: 260;
same hand: 35582.5  /  nd t: 2171; ng t: 1351; nd s: 1255.5; nd w: 1021.5; ll t: 641.5;
alternating hand: 210543.5  /  , an: 5230.5; with: 2424; ere : 2275; ith : 2057.5; ight: 1780;
roll out: 13721.375  /  st: 1985.875; ai: 1151.5; e,: 981.125; ke: 958.875; ay: 908.625;
roll in: -73457.5  /  he: -7694.625; d : -7299.625; t : -6665.75; s : -5074.75; nd: -4083.75;
long jump sandwich: 57501  /  , h: 4446; d c: 4041; d g: 3342; g w: 2223; on.: 2127;
twist: 1290  /  ue,: 800; he?: 330; ftw: 110; xe,: 20; hek: 10;

Reference: INITIAL
j c y f k | z l , u q =
r s t h d | m n a i o '
/ v g p b | x w . ; -
        e |
total: 1955272.25; scaled: 0.6573238541717444
base: 1548681.5  /  d: 160494; l: 132850.5; o: 89887.5; m: 86989.5; w: 86506.5;
same finger: 88285  /  wn: 13635; ty: 10575; ui: 8225; sc: 7015; nl: 6560;
long jump hand: 8019  /  by: 2226; w,: 992; l.: 825; lw: 591; wl: 393;
long jump: 11790  /  lw: 5910; wl: 3930; gy: 890; u;: 280; .,: 220;
long jump consecutive: 2785  /  u.: 1590; vy: 750; -u: 265; u-: 105; .u: 25;
pinky/ring twist: 300  /  iq: 270; sj: 20; Js: 10;
roll reversal: 4100  /  cry: 2540; .-I: 980; io,: 200; aqu: 80; io.: 80;
same hand: 130133.5  /  , an: 5230.5;  in : 3549.5; ther: 2398; here: 2119; all : 1756;
alternating hand: 200134.5  /  hat : 4540.5; his : 2986.5;  for: 2416.5;  his: 2260.5;  had: 2197.5;
roll out: 23517.5  /  wa: 1785.5; no: 1350.625; ai: 1151.5; li: 1139.625; wi: 1010.875;
roll in: -93285.75  /  he: -7694.625; th: -7546.875; in: -5025.625; , : -5002.5; an: -4981.125;
long jump sandwich: 30342  /  low: 4059; wil: 3372; bef: 2499; wel: 2142; y g: 1611;
twist: 470  /  -al: 120; ys?: 110; ks?: 60; la;: 60; ft?: 40;
hasufell commented 3 years ago

As you can see, the layout has as high hand alternation as dvorak... that seems off?

xsznix commented 3 years ago

I believe I used books.txt from CarpalX's corpus. (That's also where the two corpora included in this repo come from.)

However, if you're looking to a new layout for your own use, I recommend using your message history from whatever chat platform you use most often, since that will better represent the slang and text abbreviations you use in practice.