ishiland / python-geosupport

Python bindings for NYC Geosupport Desktop
MIT License
17 stars 11 forks source link

See SIMILAR NAMES? #36

Closed RaphCodec closed 8 months ago

RaphCodec commented 9 months ago

Is there a way to see what the similiar names are for the below code? My goal is to see the similiar names and use fuzzy matching to potentially find the correct street name.

from geosupport import GeosupportError

try:
    g.get_street_code(borough='MN', street='Wort Street')
except GeosupportError as e:
    print(e) # 'WORT STREET' NOT RECOGNIZED. THERE ARE 010 SIMILAR NAMES.
RaphCodec commented 8 months ago

I realized that you made it a seperate package. https://github.com/ishiland/geosupport-suggest.

Thanks

ishiland commented 8 months ago

Sorry for the late response, but yes that package will help. The part you are interested in is here:

https://github.com/ishiland/geosupport-suggest/blob/017f90c6e954a5a61536bd3d7d5ca1c244690ddf/suggest/suggest.py#L33-L40

RaphCodec commented 8 months ago

No problem. I understand we're all busy. Thank you for pointing out that specific part. It will be very helpful. Thanks.