Skip to content

Try Libpostal via its interactive CLI in two just 2 commands: docker compose up -d; docker exec -it address_parser

License

Notifications You must be signed in to change notification settings

Graphlet-AI/libpostal-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Libpostal Docker

This project provides a simple two-step process to try the Libpostal address parsing library in its interactive mode.

It also includes the Python pypostal library for you to try.

Prerequisites

The only prerequisite for this project is Docker. If you don't have it installed, you can download it from here.

TLDR Interactive Mode

This mode lets you type addresses and see how Libpostal parses them. To run it, use the following three commands:

docker pull rjurney/libpostal-docker:latest
docker run -it rjurney/libpostal-docker:latest bash
../libpostal/src/address_parser

Trying the PyPostal Python Library

To run the Libpostal Docker container, you can use the following commands:

docker pull rjurney/libpostal-docker:latest
docker run -it rjurney/libpostal-docker:latest bash
ipython

And import and use the pypostal library:

from postal.parser import parse_address

parse_address("781 Franklin Ave Crown Heights Brooklyn NYC NY 11216 USA")

You should see the result:

Out[2]:
[('781', 'house_number'),
 ('franklin ave', 'road'),
 ('crown heights', 'suburb'),
 ('brooklyn', 'city_district'),
 ('nyc', 'city'),
 ('ny', 'state'),
 ('11216', 'postcode'),
 ('usa', 'country')]

Author

This project was created out of love for Libpostal by Russell Jurney.

About

Try Libpostal via its interactive CLI in two just 2 commands: docker compose up -d; docker exec -it address_parser

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published