News for hackers. Stuff that matters.
Re:How to Write a Spelling Corrector by Ntrails on Monday December 15, 2014 @05:05AM (#8751299)
I had always assumed that spellcheckers took into account likely mistypes based on keyboard layout when working on spelling correction.

For example, "RRROR" (error) could easily have been me fat fingering the keys, whilst "MRROR" seems far less likely unless I have truly gargantuan fingers or a really really small keyboard. So you might infer I'd missed the "i" instead of mistyped the "e".

Is that ever used as part of statistical analysis?

Re:How to Write a Spelling Corrector by mkartic on Monday December 15, 2014 @07:35AM (#8751657)
A "confusion matrix" is statistical analysis you're looking for. An entry (i,j) is a score on how much the ith character is mistakenly typed (inputted) as the jth character. This can be easily adapted to various input devices.
Re:How to Write a Spelling Corrector by gcb0 on Monday December 15, 2014 @05:24AM (#8751335)
probably if the spell checker owns the keyboard (eg a android keyboard app) and probably not on most desktop ones. and even if it does use that on desktop ones it's probably assuming a layout and missing, giving worse results
Re:How to Write a Spelling Corrector by liotier on Monday December 15, 2014 @06:55AM (#8751537)
Why not make the spellchecker keyboard-aware ? Just have it query 'xkb-switch' or 'xkblayout-state print "%s"' or whatever other API is available.

Doesn't any spellchecker use keyboard layout-aware Damerau–Levenshtein distance metrics ? https://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_di... doesn't mention keyboard layout-awareness variants...

Re:How to Write a Spelling Corrector by hurin on Monday December 15, 2014 @12:15PM (#8753035)
It's not nearly as simple as it sounds in theory. Consider that you have typos which are from hitting the wrong button - and also typos from hitting the next letter before the previous letter. Also when looking at typos it's likely you'd find statistically significant differences for typos by hitting a letter to the left, or right, or prob. of typoing given the letters general position within a layout etc.
Re:How to Write a Spelling Corrector by gcb0 on Monday December 15, 2014 @08:57PM (#8755530)
> Just have it query 'xkb-switch' or 'xkblayout-state

said the other hundred of devs who now have to handle APIs to N OSes * M versions * X custom IMEI input solutions out there.