[docs] README updates now that the Python repo is separate

This commit is contained in:
Al
2016-01-26 02:40:07 -05:00
parent cffc7e1034
commit 239f8adec6

View File

@@ -33,9 +33,9 @@ comparison and full-text indexing.
libpostal is not itself a full geocoder, but should be a ubiquitous libpostal is not itself a full geocoder, but should be a ubiquitous
preprocessing step before indexing/searching with free text geographic strings. preprocessing step before indexing/searching with free text geographic strings.
It is written in C for maximum portability and performance. Python It is written in C for maximum portability and performance.
bindings are included in this repo and it's easy to write bindings to
other languages. Bindings for [Python](https://github.com/openvenues/pypostal) and [NodeJS](https://github.com/openvenues/node-postal) are officially supported, and it's easy to write bindings in other languages.
Examples of normalization Examples of normalization
------------------------- -------------------------
@@ -197,8 +197,7 @@ sudo apt-get install libsnappy-dev autoconf automake libtool
sudo brew install snappy autoconf automake libtool sudo brew install snappy autoconf automake libtool
``` ```
For C/C++ users or those writing bindings (if you've written a Then to install the C library:
language binding, please let us know!):
``` ```
git clone https://github.com/openvenues/libpostal git clone https://github.com/openvenues/libpostal
@@ -212,27 +211,15 @@ sudo make install
sudo ldconfig sudo ldconfig
``` ```
To install via Python, you should first install the C library and then run: Bindings
--------
``` Libpostal is designed to be used by higher-level languages. Here are the officially-supported language bindings:
python setup.py install
```
Python usage - Python: [pypostal](https://github.com/openvenues/pypostal)
------------ - NodeJS: [node-postal](https://github.com/openvenues/node-postal)
After installing:
```python
from postal.expand import expand_address
expand_address('Quatre vignt douze Ave des Champs-Élysées', languages=['fr'])
from postal.parser import parse_address
parse_address('The Book Club 100-106 Leonard St, Shoreditch, London, Greater London, EC2A 4RH, United Kingdom')
```
**Note**: for expand_address, we currently default to English if no languages parameter is passed. When the language classifier is complete we'll remove this requirement and libpostal will predict the language automatically if none is specified.
If you don't see your language of choice, or if you're writing a language binding, please let us know!
Command-line usage (expand) Command-line usage (expand)
--------------------------- ---------------------------