User:JLS/speller

From OpenStreetMap Wiki
Jump to navigation Jump to search

Earlier I wrote a spell checker for key names. I have not run it for a long time now.

It uses a list of words to be changed and do not touch anything not in the list. The speller is written in Java. In the list correct words are prefixed with a + and incorrect with a -. The speller replaces a bad word with a correct one from the line above.

Extra spaces between +/- and word or after word is significant.

The list of words is moved to Subversion repository: http://svn.openstreetmap.org/applications/utils/planet.osm/java/speller/words.cfg

Instead of trying to predict every possible misspelling variation, I'd suggest using using wikipedia:Levenshtein distance to make a better guess for fixing unrecognized keys (and even values?). Stefanb 14:37, 10 July 2007 (BST)