Open Corvan opened 1 month ago
Geographic expansions are mostly not included since the implementation is simplistic, just cartesian product of the expansions to create keys for matching. It can lead to a lot of irrelevant results across languages. The library's not really designed for standardizing addresses for display though it can be cludged into doing so. You can always just include your own dictionary of expansions and look up the parsed result in that.
Hi!
I played around a bit with libpostal and pypostal, and I am quite impressed. Kudos!
My country is
Germany
Here's how I'm using libpostal
Thinking about including it in the Odoo instance of where I work, but I am just in the (private) explorative stage yet. The use-case would be to deduplicate purchased leads.
Here's what I did
I tried using expand_address (from pypostal, but this is not a pypostal issue).
This is my unittest:
This is the
normalize_address
function:And this is the
normalize_country_string
function:Here's what I got
Worked well with addresses, like
sqr
toSquare
But what I got back fromU.S.A.
I got backusa
Here's what I was expecting
I was not able to expand the abbreviation of
U.S.A.
to e.g.:United States of America
ar another representation. Maybe the library is not intended to do so, which would be completely fine with me. I was just wondering, if I made an Error or if that is intentional?Here's what I think could be improved
More documentation, and maybe reStructuredText docstrings, instead of something doxygen-like in the python parts, because they can be better parsed by Python tools (like e.g. PyCharm)