Hey everyone,
The city lexicon from Cognigy is pretty huge, and we wanted a local German variant with all German cities. The issue with German cities is that multiple states may have a city of the same name or there are cities with add-ons, such as "Weiding Landkreis Cham" and "Weiding Landkreis Schwandorf". The add-ons are also not consistent, they can just be "Schwaben", "Oberpfalz" or at river so-and-so. Some names may appear multiple times in one state and never in another, others may appear in multiple states.
While it is possible to plug-in an API that gathers the city code from the user, not everyone knows a city code by heart and I think having to google the code breaks the experience. Using a Google Maps API also yields only the first city Google finds, so far.
So far, I've done as the Cognigy city lexicon and slotted all city names with "city", but also included the state where it's located. What I want to do is create a filter whenever the system recognizes a city name that could apply to more than one, as users usually won't write out the entire official name.
Now, I'm wondering how to implement the filter. Do I create one keyphrase entry for "Weiding" and include "Weiding Landkreis Cham" and "Weiding Landkreis Schwandorf" as Synonyms including all ways to spell them, while also including all states in the slots (as I've done so far)? I fear this method might be ruined as soon as I add different spellings for cities which appear just once, as I imagine I would have filtered by amount of synonyms found. Or do I include each location as single keyphrase and somehow include a marker in the data field (I'm no coder, so I'm pretty lost on that)?
Thank you for any input!
Comments
1 comment