News for hackers. Stuff that matters.
Re:A Spellchecker Used to Be a Major Feat of Software Engine... by rwallace on Thursday December 24, 2015 @06:10PM (#10789872)
I remember when I was about twelve or thirteen, seeing some mention of automatic spelling checking, trying to figure out how it could be done, and ending up very skeptical. It seemed to me there just wasn't enough regularity for any compact algorithm to do the job, so it just couldn't be done without literally having a list of every word in the English language, and even if you had a 64K machine, that wouldn't fit in memory alongside a word processor and your document.
Re:A Spellchecker Used to Be a Major Feat of Software Engine... by VonGuard on Thursday December 24, 2015 @06:49PM (#10789952)
Imagine my surprise when my final project in discrete math class in college was building one of these.
Re:A Spellchecker Used to Be a Major Feat of Software Engine... by teh_klev on Thursday December 24, 2015 @02:58PM (#10789412)
Obligatory Peter Norvig "How to Write a Spelling Corrector":

http://norvig.com/spell-correct.html

Re:A Spellchecker Used to Be a Major Feat of Software Engine... by bithive123 on Thursday December 24, 2015 @02:34PM (#10789336)
Others might also find interesting this video from 1982 where Brian Kernighan demonstrates building a simple spell checker using UNIX command line utilities: https://youtu.be/XvDZLjaCJuw?t=5m15s
Re:A Spellchecker Used to Be a Major Feat of Software Engine... by danso on Thursday December 24, 2015 @03:00PM (#10789419)
That was a great watch...and if you keep on watching for a few more minutes, you can watch Lorinda L. Cherry rewrite his implementation using Unix pipes and then creating a talking calculator. The screencasting technology wasn't quite there yet ;), but both are really excellent demonstrations and eludications of the Unix philosophy and mindset that is pretty much unchanged and invaluable ~34 years later https://youtu.be/XvDZLjaCJuw?t=13m47s
Re:A Spellchecker Used to Be a Major Feat of Software Engine... by guard-of-terra on Thursday December 24, 2015 @03:41PM (#10789524)
This is perhaps true for English, isolating language with clear word boundaries.

Making spellchecker for Russian (inflecting language), Japanese (I think they don't always put spaces between words, Koreans less so) or Finnish (agglutinating language) still takes good part of a decade, more or less.

Re:A Spellchecker Used to Be a Major Feat of Software Engine... by tokenadult on Thursday December 24, 2015 @01:58PM (#10789221)
Natural language processing is HARD, and is an ongoing topic of research. Making a spellchecker that works right is still a major feat of software engineering. I have to hand-tweak all the spellcheckers in all the software programs I use that include spellcheckers.
Re:A Spellchecker Used to Be a Major Feat of Software Engine... by gmu3 on Thursday December 24, 2015 @03:36PM (#10789512)
I still remember getting a new computer for Christmas almost two decades ago and seeing Microsoft underline words red and correct spelling/grammar the first time. It felt like magic.
Re:A Spellchecker Used to Be a Major Feat of Software Engine... by personjerry on Thursday December 24, 2015 @02:27PM (#10789312)
But it seems like to me the "progress" mentioned is more in the hardware than the software, in contrast to the emphasis on Software Engineering from the title.
Re:A Spellchecker Used to Be a Major Feat of Software Engine... by ihm on Thursday December 24, 2015 @10:03PM (#10790271)
We still could be stuck writing assembly on super fast hardware. Programming languages' UI has definitely improved, enabled to be sure by hardware (as in his Python/Perl example).
Re:A Spellchecker Used to Be a Major Feat of Software Engine... by ufmace on Thursday December 24, 2015 @08:12PM (#10790085)
Spell-checking seems straightforward enough now, if you're just comparing words against a stored dictionary. The tricky part seems to be providing reasonable suggestions for a misspelled word.
Re:A Spellchecker Used to Be a Major Feat of Software Engine... by rileymat2 on Thursday December 24, 2015 @02:29PM (#10789319)
I would like to see some progress on the OSx spell checker. I am tired of going to google to get the correct spelling for words. It seems to be much better at correcting spelling.
Re:A Spellchecker Used to Be a Major Feat of Software Engine... by sp332 on Thursday December 24, 2015 @03:06PM (#10789435)
Google's spellchecker has been watching billions of people correct their own typos keystroke-by-keystroke for years. It runs on a global network of computers with untold hoards of RAM and disk arrays with indefinite IOPS. Your OSx spellchecker gets updated... occasionally, and it runs on your Mac.
Re:A Spellchecker Used to Be a Major Feat of Software Engine... by true_religion on Thursday December 24, 2015 @05:47PM (#10789825)
> It runs on a global network of computers with untold hoards of RAM and disk arrays with indefinite IOPS.

Much of that is just to provide automatic spell checking to millions of people concurrently.

I would doubt the actual spell checking software for a single language, excluding proper names, would be something a Mac can't run.

Re:A Spellchecker Used to Be a Major Feat of Software Engine... by oneeyedpigeon on Thursday December 24, 2015 @06:01PM (#10789851)
Makes me think that the equivalent of this '30 years ago' story with today's present as the past will be "they used to carry out complex operations on their OWN computers? Oh, they had non-instant network speeds, that explains it..."
Re:A Spellchecker Used to Be a Major Feat of Software Engine... by ashi on Thursday December 24, 2015 @05:05PM (#10789710)
OS X uses Hunspell, an open source tool used by many. Maybe you should be complaining that Google aren't contributing to Hunspell or anything that might replace it.
Re:A Spellchecker Used to Be a Major Feat of Software Engine... by fyolnish on Thursday December 24, 2015 @09:26PM (#10790221)
Would you be surprised to hear that Google also uses Hunspell and has contributed to it?
Re:A Spellchecker Used to Be a Major Feat of Software Engine... by wernercd on Thursday December 24, 2015 @07:58PM (#10790057)
Yeah... blame Google for Apple's shortcomings. Because Google is responsible for Apple's software choices.
Re:A Spellchecker Used to Be a Major Feat of Software Engine... by coldcode on Thursday December 24, 2015 @04:07PM (#10789574)
Everything was a major feat if you go back far enough. Having started as a programmer in the early 80's every programming generation did things that seemed impossible to the prior one. Today the "generations" just happen faster.
Re:A Spellchecker Used to Be a Major Feat of Software Engine... by timonoko on Friday December 25, 2015 @05:10AM (#10790857)
Tell me about it: http://www.ling.helsinki.fi/~fkarlsso/genkau2.html

Karlsson's Finnish spellchecker was already there around 1982(?), because it is rulebased, but very complex. Ruletables are sized almost like english dictionaries.

Google tries to compile Finnish language based on dictionaries, but fails everytime and will fail forever.

Re:A Spellchecker Used to Be a Major Feat of Software Engine... by transfire on Thursday December 24, 2015 @06:19PM (#10789895)
Er... nope. Spellcheck is not just a matter of looking up a word in a hash table. Spellcheck is still a hard problem even if hardware and software make it a bit easier today than it was a couple decades ago. To elucidate, computers are still far too slow to do a simple brute force search for the closest matching words. One has to use binary searches, at least, or better, tree data structures to get good performance.
Re:A Spellchecker Used to Be a Major Feat of Software Engine... by ntumlin on Thursday December 24, 2015 @01:46PM (#10789183)
Does anyone have a link to specific tricks used or even implementations of spellcheckers from then?
Re:A Spellchecker Used to Be a Major Feat of Software Engine... by PeCaN on Thursday December 24, 2015 @02:34PM (#10789337)
AFAIK most of them use some blend of edit distance (usually a modification of Levenshtein distance to support transpositions) and often a phonetic algorithm like Soundex[1].

Dictionaries are most often stored as a radix trie, and a bloom filter can be used to quickly check if a word is misspelled.

EDIT: I'm dumb, you said "from then". Whoops. If I had to guess it was probably similar, as radix trie + bloom filter is a very memory efficient way to store and search the dictionary.

1: https://en.wikipedia.org/wiki/Soundex

Re:A Spellchecker Used to Be a Major Feat of Software Engine... by unhammer on Friday December 25, 2015 @02:42AM (#10790676)
Bloom filter: That's assuming your vocabulary is reasonably finite. http://www.ling.helsinki.fi/~fkarlsso/genkau2.html has a list of forms for a single finnish noun. That's including case, possessives and clitics, but you can also have compounding (eg. several nouns in a row as one word) and derivations into other parts of speech (verbs become nouns etc). And once you've found out it's misspelt, you need suggestions..
Re:A Spellchecker Used to Be a Major Feat of Software Engine... by doug1001 on Thursday December 24, 2015 @03:15PM (#10789456)
indeed, spell checker was the original use case for the Bloom Filter (i.e., the one discussed in the 1972 paper by Bloom)
Re:A Spellchecker Used to Be a Major Feat of Software Engine... by simmons on Thursday December 24, 2015 @05:04PM (#10789708)
I used Word Writer 4 on the C64. Its spell-check system avoided loading the entire dictionary into memory or using an on-disk structured random-access database. Instead, it simply sorted the words in your document first, then stepped through this list while sequentially reading the sorted dictionary from disk. You could watch this process on the screen while it was happening.

Needless to say, spell checking was a lengthy task that you invoked sparingly. :)

Re:A Spellchecker Used to Be a Major Feat of Software Engine... by rabbyte on Thursday December 24, 2015 @06:05PM (#10789866)
I can only conclude from this that every line of code you write today, no matter how brilliant or beautiful, is an ugly hack.
Re:A Spellchecker Used to Be a Major Feat of Software Engine... by hueving on Thursday December 24, 2015 @07:35PM (#10790019)
Why would you conclude something so cynical and ignorant? It's an indicator that in general we are advancing forward.
Re:A Spellchecker Used to Be a Major Feat of Software Engine... by rabbyte on Wednesday December 30, 2015 @01:05PM (#10813326)
I mean it as a matter of perspective. As a perfectionist, I find it helpful. Sorry you took it as ignorant cynicism.