How to Write a Spelling Corrector (2007)
norvig.com
How to Write a Spelling Corrector (2007)
1–10 of 25 posts
Re: How to Write a Spelling Corrector (2007)
#2Also the NLP Book on the data side https://web.stanford.edu/~jurafsky/slp3/
Re: How to Write a Spelling Corrector (2007)
#3Re: How to Write a Spelling Corrector (2007)
#4Re: How to Write a Spelling Corrector (2007)
#5Re: How to Write a Spelling Corrector (2007)
#6I've had a thought and am curious how people would solve it. Sometimes, if you copy words off a PDF lecture slide, all the words are mashed together (eg. Hello Foo bar → HelloFoobar). Is this an AI domain or can it solved by simple programming?
e.g.
logp(_, "") = 0
logp(word0, text) = max(logp_bigram(word0, word1) + logp(word1, rest) for word1, rest in prefix_words(text))
Re: How to Write a Spelling Corrector (2007)
#7Here's an impl of some kind: https://github.com/crisbal/hmm-spellcheck
Re: How to Write a Spelling Corrector (2007)
#8I've had a thought and am curious how people would solve it. Sometimes, if you copy words off a PDF lecture slide, all the words are mashed together (eg. Hello Foo bar → HelloFoobar). Is this an AI domain or can it solved by simple programming?
look at the Speech and Language processing book, particularly chapter 3 about language models https://web.stanford.edu/~jurafsky/slp3/
You can implement a language model based on character n-grams to calculate whether a sequence is more likely with or without a space. Of course you would need a way of estimating the proability of each sequence, which means you need a corpus to train your language model on.
Re: How to Write a Spelling Corrector (2007)
#9I've had a thought and am curious how people would solve it. Sometimes, if you copy words off a PDF lecture slide, all the words are mashed together (eg. Hello Foo bar → HelloFoobar). Is this an AI domain or can it solved by simple programming?
There also exists research on solving this problem unsupervised which basically invents new word boundaries for a language (remember that spoken languages doesn’t have word boundaries - it was invented for writing and strictly speaking, current spelling isn’t the only way to solve word boundaries for a given language)
Re: How to Write a Spelling Corrector (2007)
#10I've had a thought and am curious how people would solve it. Sometimes, if you copy words off a PDF lecture slide, all the words are mashed together (eg. Hello Foo bar → HelloFoobar). Is this an AI domain or can it solved by simple programming?
and tried to find which sentence without spaces matches your sentence