rinigus / geocoder-nlp Goto Github PK
View Code? Open in Web Editor NEWGeocoder library based on libpostal normalization of libosmscout generated database
License: MIT License
Geocoder library based on libpostal normalization of libosmscout generated database
License: MIT License
check that we dont have the same way shown multiple times for a admin region. select one and remove others
HELLO RINIGUS
assume that a search string can give a direct hierarchy as separated by comma:
house, street, district, city, ...
use additional keywords to indicate that we don't know the levels "h-01, h02, "...
We would need to return types of the results. In addition to POI type, way, address, and few other types have to be supported. Requires change in database format and results reporting
as a part of a solution allowing to search for substrings of the locations (for example, if the street is named "John Smith", you could search for Smith), some common substrings are probably in the database. For example, "street". Make stats and remove them automatically on the basis of database record distributions.
Some fuel stations use brand instead of name
Example: Viby is not a part of Roskilde region
Searching for addresses with OSM Scout + WhoGo maps never returns an exact match. I've tried this with few addresses I use often. With a bit of luck I am able to get results near the desired address, but the are all POIs (mainly bus stops that have the name of the street I'm searching, or in other cases small business activities that also, for same reason, have the name of the street in their name.
I sent a private mail to rinigus with a log and some examples including sensible data I don't want to publicly share here.
we can look up prim_id and last_subobject immediately . if we know that the best result already has a higher level of the match, we can even drop any elements without subnodes (use join instead of left join)
first, search for direct match. look for expanded string only if direct match is not found
For many types, it doesn't matter whether its in a building or not (parking maybe exception). So, check out and simplify the import stylesheet
coming from addr and poi visitors on import
Hi @rinigus
I tried to find contact detail for you online but came up blank :)
I think there might be a possibility for some collaboration as we are working in similar areas.
Please send me an email if you'd like to catch up (either video call or in-person in Berlin).
You can find my contact details on my GitHub profile.
-P
To simplify the use, catch SQLite exceptions and use return value to signal an error.
make separate table for format and other data. format would be
key, value as a string
add version as a first record
for example, Parkstraße searches in Germany take a while.
Adding index combining prim_id and normalized name fixed it for me. Consider reorganizing the database and add separately link and normalized names tables.
Searching for POIs can be improved by using aliases for POI tags:
My use case: I wanted search next filling stations around my current position. (My car was low on gas)
In German the appropriate word would be "Tankstelle". This translates to the English words "filling station" or "gas station". But POI searches with both translations failed in PoorMap (+ OSM Scout Server), since the "official" tag name for this kind of infrastructure is "amenity : fuel". (http://wiki.openstreetmap.org/wiki/Map_Features)
Another example: Search for "drugstore" gives no results, since the "official" tag name is "pharmacy".
Possible tag lists:
But I am not sure, whether the "... in" or "... near" variations will help.
Example: The user searches for "Tankstelle", OSM Scout Server detects that this is an alias for a POI tag and adds "amenity_fuel" to the search string.
See also:
otsaloma/poor-maps#59
with the current version of libpostal, it would be better to group normalizations so we could search for group immediately and not transverse the tree many times.
give list of languages and a country to parse the query
if libpostal managed to parse the string into several hierarchies and we found a result, there is no need to use primitive parser search.
also, if libpostal and primitive parser both have not found any hierarchy, we don't need to repeat the same search
in general, have to record performed searches and skip the copies of them.
sort by
example: turm strase 24, berlin
As a part of an adaptation of new libpostal, document the import process.
Related to #29
See private email from today, 13-14 Dec 2017
as an option, search for substring using str form
either submit importer to libosmscout or write a separate one to get data from pbf
Check in Denmark
Originally from rinigus/osmscout-server#228
As mentioned in https://talk.maemo.org/showthread.php?p=1539764&postcount=119, OSM Scout Server drops OSM POIs, which do not have a name.
This will delete many POIs (which are interesting for me) like parking lots, public toilets or playgrounds, since those typically do not have special names.
Example: Looking at the parkings lots in my home town, I see the following POI search results:
Could you please remove this filter criterion?
hey can you please provide step by step procedure for libpostal language specific installation
During libosmscout, on import failure, exit libosmscout importer with non-zero value.
example, ahhaa in tartu
It would be appropriate move the distribution scripts to osmscout-server project. That way it would cover all osmscout server datasets in one place
use spatialite to support search with geometry restrictions, if needed
perform search by type as well as name of the feature
use known country contours and determine countries covered by the database. this would allow to load corresponding libpostal parser
From: https://talk.maemo.org/showthread.php?p=1539768#post1539768
Do you do some kind of tag merging, when creating the OSM Scout Server database? In OsmAnd I can search for POI with tag "amenity _library" or "amenity_police". In OSM Scout Server database libraries and police stations in my hometown can be found, but only by their name. And the type is listed by PoorMaps as "Building".
In my opinion, it would be helpful, to be able to explicitly search for "libraries" or "police stations" by tag, since if I am new in town, I don't know the name of the library.
As far as I remember, types are merged in the import and assigned as only one for POI. Hence the problem.
...
When designing geocoder, I was mainly focused on getting results by name since that was really poor. Now it's time to look into search by type as in nearby search and make it work well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.