Has anyone cast Peter Norvik's spell in Perl?

I saw Michael Sparks very interesting section of Peter Norvig Spell Checker at SO DevDays in London, and I was wondering, did anyone try to implement this piece of code in another language, say, Perl or, possibly, C ++?

+4
source share
3 answers

I made this presentation at Boston DevDays, and I'm a little disappointed with how people focus on the number of lines of code. For example, the C # implementation also has a low number of lines, but I don’t see an algorithm at all for all the noise words in the code.

What I emphasized in the presentation was the silent character of Python, allowing me to express the algorithm without a lot of hand cleaning and compiler leakage.

I understand that people will not agree at this point, and that there are a few “taste-insensitive” ones.

+6
source

There is a list of implementations in other languages ​​at the end of the article, including Perl .

+7
source

Uh, I did it as an exercise. Had to use hashes instead of elegant dict objects; Yes, it’s a little cumbersome, but not so much.

+1
source

All Articles