0

Language and filter bugs

Thanks for all your efforts.

It seems that you are using the user browser language to determine which database to query, or at least it's my best guest. This has unfortunate results when using a filter. In french I'd have to use type(ville) whereas in english I'd use type(town). Using type(town) with a browser with french as a default language will return no results for any query.

Now, try this:
http://where.yahooapis.com/v1/places$and(....;count=0?appid=[yourAppid]&format=geojson&lang=fr
will return nothing (at least from my browser)
whereas
http://where.yahooapis.com/v1/places$and(....;count=0?appid=[yourAppid]&format=geojson
will return a number of results (although, see below, with naming issues)

Another language issue. Looking up for "Rennes" in french will return a set of cities including one called rennes-en-grenouille. But the result returned for the same query in english will return the short "rennes" for the same city (same woeid). All such names I tested had similar bugs, the english result is systematically shortened while there is no reason to do so.

Thanks for your time

by
2 Replies
  • Place type names used in the .type filter are localized to the requested language. If you prefer, you can use place type codes instead, which are language-invariant. Place type codes can be found in the code attribute of the placeTypeName element in any GeoPlanet response. A full list of place type codes and their place type names can be returned using the placetypes collection:

    CODE
    http://where.yahooapis.com/v1/placetypes?appid=[yourAppid]

    returns list of place types

    For your example, you can make the request:
    CODE
    http://where.yahooapis.com/v1/places$and(.q(rennes),.type(7));count=0?appid=[yourAppid]&format=geojson&lang=fr


    As for English place names being different from French place names, this often occurs because English speakers are not used to hyphenated city names. If you feel this is a problem, please let us know.

    Eddie Babcock
    Yahoo! Geo Technologies

    QUOTE (josepe c @ Feb 18 2009, 01:36 AM) <{POST_SNAPBACK}>
    Thanks for all your efforts.

    It seems that you are using the user browser language to determine which database to query, or at least it's my best guest. This has unfortunate results when using a filter. In french I'd have to use type(ville) whereas in english I'd use type(town). Using type(town) with a browser with french as a default language will return no results for any query.

    Now, try this:
    http://where.yahooapis.com/v1/places$and(....;count=0?appid=[yourAppid]&format=geojson&lang=fr
    will return nothing (at least from my browser)
    whereas
    http://where.yahooapis.com/v1/places$and(....;count=0?appid=[yourAppid]&format=geojson
    will return a number of results (although, see below, with naming issues)

    Another language issue. Looking up for "Rennes" in french will return a set of cities including one called rennes-en-grenouille. But the result returned for the same query in english will return the short "rennes" for the same city (same woeid). All such names I tested had similar bugs, the english result is systematically shortened while there is no reason to do so.

    Thanks for your time
    0
  • Thanks, this is very useful.

    As for the english/french name thing in the case of hyphenated names, I think it is fairly disturbing. You can try to make a search for "aix" (type city/7) and you'll see there are many in the english results, almost 10 in France alone, and 3 with admin1 = "nord pas de calais" (which appears correctly in english, not shortened). The same search with a french browser or with lang=fr, will show you that in fact these 3 are Aix-Noulette, Aix en Issart and Aix. But an english user will not see this difference (even if the admin1 is indicated).

    I think it might really create confusion and difficulties to disambiguate the names.
    thanks
    0
This forum is locked.

Recent Posts

in GeoPlanet General Discussion