GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Soundex  XML
Forum Index -> FAQ - frequently asked questions
Author Message
alex1er



Joined: 16/01/2007 13:43:40
Messages: 5
Offline

Hello.

I was searching for a town located in thailand and i make a request for "chang mai" but the correct syntax is "chiang mai". so i don't have it.

with the soundex function, i could have retrieve my town.

So, does this option is avaible or then, is it to much work to add it.


Thanks for response and your helpfull web service.

Alex
marc



Joined: 08/12/2005 07:39:47
Messages: 4412
Offline

Hi Alex

Fuzzy search is not yet available. There is however a experimental 'did you mean' function which can make a suggestion if no result has been found.

The main problem with your search is that there are 14 records with "chang mai" although you were looking for "chiang mai" in reality. How can our search engine know this? Would you like to have the fuzzy search on the advanced options?

Regards

Marc

[WWW]
alex1er



Joined: 16/01/2007 13:43:40
Messages: 5
Offline

Hi

Thanks for response.


you ask : "How can our search engine know this? " So with for example mysql, there is a function called Soundex () which is able to return "chiang" if you pass "chang" as a parameter because it don't care about "aeiouh" and double letter ...

So i was thought that it could be possible to query your SGBD with this function as an optional parameter of the query. As you manage the 'name_equals' you can manage 'name_soundex'.

you ask : 'Would you like to have the fuzzy search on the advanced options? ' Yes i'd like.

Thanks a lot for responses.

ALEX
marc



Joined: 08/12/2005 07:39:47
Messages: 4412
Offline

Hi Alex

There is now a checkbox 'fuzzy' on the advanced search options :
http://www.geonames.org/advanced-search.html
If this is checked the search will also find similar names.

The fuzzy search is not using the soundex algorithm as soundex is mainly aimed at English words and geonames is supposed to be international. The fuzzy search is using the Levenshtein distance to compare similarity of words.

If you want to use if for a webservice you can add the parameter fuzzy with a float number indicating the desired similarity.

fuzzy : a value between 0 and 1 to set the required similarity between the query term and the matching terms. For example, for a minimumSimilarity of 0.5 a term of the same length as the query term is considered similar to the query term if the edit distance between both terms is less than length(term)*0.5

Examples :
Zermatt is misspelled as Zermat :
normal search returns no hits :
http://ws.geonames.org/search?q=zermat&maxRows=10
fuzzy 0.8 returns 12 hits :
http://ws.geonames.org/search?q=zermat&maxRows=10&fuzzy=0.8
and fuzzy 0.6 returns 131 hits :
http://ws.geonames.org/search?q=zermat&maxRows=10&fuzzy=0.6

Cheers

Marc

[WWW]
alex1er



Joined: 16/01/2007 13:43:40
Messages: 5
Offline

Hi Marc

Thanks for the work.

But i can't use your links!! Firefox can't open the URL.

I 'll try it with my web site and tell you if fuzzy like soundex.

But it 'll be very usefull when a serch has no result, to propose another choice with query the same word with the fuzzy parameter. It is very professional.

Thanks again.

Is there is a link or gif i can put on my futur site to reference geonames?

Alex
marc



Joined: 08/12/2005 07:39:47
Messages: 4412
Offline

Hi Alex

It is a good idea to give the fuzzy choice if nothing could be found. I will implement it as soon as I find the time.

There is no official gif for geonames. But you can use the one noiv from exploreourpla.net has created :


If you are a designer and have a good idea for an icon, we are open for everyhing.

Cheers

Marc

[WWW]
ludaw



Joined: 20/08/2009 11:27:24
Messages: 105
Offline

Hi Marc,

I've come across several posts about fuzzy search. It was a great surprise to discover that this feature was available through the search webservice, since there is no mention of it in the documentation.

However, I'm having an issue with multi-word names. Although you said composite names were now indexed (http://forum.geonames.org/gforum/posts/list/573.page), they don't seem to be recognized. Ex: Levallois Perret in France.

So what is the status on this feature?
marc



Joined: 08/12/2005 07:39:47
Messages: 4412
Offline

you are right documentation was still missing. I have added the parameter to the documentation and fixed an issue with composite names:
http://ws.geonames.org/search?q=Levallois+Perrez&&fuzzy=0.8

Best

Marc

[WWW]
ludaw



Joined: 20/08/2009 11:27:24
Messages: 105
Offline

Great! Thanks a lot!

I've checked the web service so it's fine to me.
Just in case you don't know: the advanced search on the website is still bugged concerning fuzzy search on composite names.

Regards
marc



Joined: 08/12/2005 07:39:47
Messages: 4412
Offline

I know. The change has not yet been deployed on the www or other servers, only on the ws.geonames.org server for testing.


Marc

[WWW]
 
Forum Index -> FAQ - frequently asked questions
Go to:   
Powered by JForum 2.1.5 © JForum Team