Ideas & Suggestions

City detection algorithm?

City detection algorithm?

Postby jent » Tue Nov 15, 2011 4:42 pm
I recently searched Wolfram|Alpha for "Washington, DC to San Salvador," using the accepted form and spelling for two major cities. Wolfram|Alpha thought I meant "Washington state to Washington, DC to SAN" (and ignoring the Salvador part of the city name), which it figured was an airport in Spain.

Can anyone shed some light on how Wolfram|Alpha parses city names? I'd love to better understand how to search as well as suggest that the developments consider amending certain parsing so that a search like the one I did, which uses correct terminology and natural language, ends up indeed being the search I meant it to be.
jent
 
Posts: 26
Joined: Fri Oct 21, 2011 2:09 pm

Re: City detection algorithm?

Postby briangilbert » Tue Nov 15, 2011 10:42 pm
As You have recently joined I will risk assuming you have not noticed the 'assumptions' at the top of the output to your query. There you can click to correct the assumptions made by WA when the English is ambiguous.
hope this helps.
briangilbert
 
Posts: 1158
Joined: Mon May 18, 2009 5:30 pm
Location: London England

Re: City detection algorithm?

Postby jent » Tue Nov 15, 2011 10:58 pm
Good point. If I search just search for "San Salvador," it assumes I mean the tiny Ecuadorian island, but allows me to click "as a city" to get the correct meaning. But when I search for my original search (referenced in my original post), it misinterprets "San Salvador" but doesn't have a correct suggestion as it does when I search for "San Salvador" by itself.
jent
 
Posts: 26
Joined: Fri Oct 21, 2011 2:09 pm

Re: City detection algorithm?

Postby briangilbert » Tue Nov 15, 2011 11:35 pm
Another idea
Washington, DC to (San Salvador as a city)
gives 4129 miles
briangilbert
 
Posts: 1158
Joined: Mon May 18, 2009 5:30 pm
Location: London England

Re: City detection algorithm?

Postby WolframAlphaSupport » Wed Nov 16, 2011 2:01 am
Dear jent,

The input "Washington, DC to San Salvador" should return the same result as the input "Washington to San Salvador, El Salvador". This issue has been passed along to the relevant developers for review.

Thank you for helping us improve Wolfram|Alpha.
WolframAlphaSupport
 
Posts: 19
Joined: Fri Oct 28, 2011 3:39 pm

Re: City detection algorithm?

Postby jent » Wed Nov 16, 2011 3:07 pm
briangilbert wrote:Another idea
Washington, DC to (San Salvador as a city)
gives 4129 miles

Yes, but this is incorrect. This is giving the distance from Washington state to Washington, DC, to San Salvador, when the language naturally assumes just Washington, DC to San Salvador.
jent
 
Posts: 26
Joined: Fri Oct 21, 2011 2:09 pm

Re: City detection algorithm?

Postby briangilbert » Wed Nov 16, 2011 4:03 pm
jent wrote:
briangilbert wrote:Another idea
Washington, DC to (San Salvador as a city)
gives 4129 miles

Yes, but this is incorrect. This is giving the distance from Washington state to Washington, DC, to San Salvador, when the language naturally assumes just Washington, DC to San Salvador.


Quite right. I got that completely wrong. I even ignored the map which illustrates your point perfectly. The sooner fixed form input takes over the better. It is probably coming based on Mathematica. Freeform could remain as a sort of translator. You would input in Freeform and be shown the Mathematica interpretation. Only when you approved that would it continue to the answer.
briangilbert
 
Posts: 1158
Joined: Mon May 18, 2009 5:30 pm
Location: London England

Re: City detection algorithm?

Postby yos233 » Wed Nov 16, 2011 4:18 pm
How about you take out the Washington, so there is no chance of confusion and just leave it as DC. Then add city to the end of San Salvador to disambiguate.

"DC to San Salvador city". Worked for me.
Eric Vander
yos233
 
Posts: 122
Joined: Tue Nov 16, 2010 2:48 pm

Re: City detection algorithm?

Postby jent » Wed Nov 16, 2011 9:12 pm
yos233 wrote:How about you take out the Washington, so there is no chance of confusion and just leave it as DC. Then add city to the end of San Salvador to disambiguate.

"DC to San Salvador city". Worked for me.

You're totally right, but the name of the city is Washington, DC (with comma).

Also, I was interested that my input didn't offer the suggestion of "San Salvador (as a city)"–it only offers that search suggestion when you search just for "San Salvador." I would like it if it offered that alternative search suggestion when searching for a route.
jent
 
Posts: 26
Joined: Fri Oct 21, 2011 2:09 pm

Re: City detection algorithm?

Postby WolframAlphaSupport » Fri Mar 09, 2012 7:23 pm
I wanted to let you know that the issue regarding the input "Washington, DC to San Salvador" has been fixed on the site. See http://www.wolframalpha.com/input/?i=Wa ... n+Salvador

Thank you for helping us improve Wolfram|Alpha.

Best wishes,

WolframAlphaSupport
WolframAlphaSupport
 
Posts: 19
Joined: Fri Oct 28, 2011 3:39 pm

Who is online

Users browsing this forum: Yandex and 1 guest