I would like to be able to do a 'fuzzy' search using the geonames database, a bit like I would do in Google Maps. Basically I can type in a location and it would return me the best possible match.
I have considered simply splitting at word breaks or at commas and then doing a search on each of the components. Are there any other approaches?
i recommend you to use a fulltext search engine like solr or lucene. the Gisgraphy framework can inject the data into a fulltext search engine and provide geoloc and fulltext webservice with a spell checker. Many format are available XML,JSON,PYTHON,RUBY,PHP, ...