Expostal v0.2.0 Expostal View Source
Address parsing and expansion module for Openvenue’s Libpostal, which does parses addresses.
Link to this section Summary
Functions
Loads the large dataset from disk for libpostal and prepares it for future calls
Expand given address into a list of expansions
Parse given address into a map of address components
Link to this section Functions
Loads the large dataset from disk for libpostal and prepares it for future calls.
If you do not run this explicitly, then it will be run by parse_address/1 or expand_address/1
on their first run. This is a very slow process (it can take 10s of seconds), so if you value
the responsiveness of your application, you can spawn a secondary thread to run this bootstrap
in the background on your application startup:
spawn(fn -> Expostal.bootstrap end)
This will prevent you IEx shell from hanging during startup and will make the library much more likely to be ready for immediate usage for your first call.
Expand given address into a list of expansions
Examples
iex> Expostal.expand_address(“781 Franklin Ave Crown Hts Brooklyn NY”) [“781 franklin avenue crown heights brooklyn new york”, “781 franklin avenue crown heights brooklyn ny”]