openvenues / libpostal

A C library for parsing/normalizing street addresses around the world. Powered by statistical NLP and open geo data.
MIT License
3.99k stars 414 forks source link

Shorten an address #623

Open pit-development opened 1 year ago

pit-development commented 1 year ago

Hi!

I was checking out libpostal, and saw something that could be improved.


My country is

The Netherlands


Here's how I'm using libpostal

As a python rest api to expand and parse the addresses


Here's what I did

Not really what I did, but what I searched for and couldn't find. The expand works nice, but for some use cases I would use it almost like an opposite. To shorten / simplify an address. Because the details are here in regards of the abbreviations, I was hoping for a possibility within this library. Unfortunately I could not find it in the documentation and or the issue list.


Here's what I got

As from your example in the expander: "One-hundred twenty East 96th Street, New York, 10128, United States of America"


Here's what I was expecting

That could be "120 E 96th str. NY, 10128, US". So this would be the opposite of the expander, the imploder, simplifier, shortener, you name it.


For parsing issues, please answer "yes" or "no" to all that apply.


Here's what I think could be improved

I'm curious, what do you think, is this something you would like to add?

Or maybe it's there, if so could someone reference to an existing functionality within this library or an addition. Or it exists elsewhere, could you point me in that direction than?

I would be happy to help if some see the light to include this in libpostal.