Skip to main content

Library for parsing unstructured FR addresses strings into address components

Project description

fraddress-parser

fraddress is a python library for parsing unstructured FR addresses strings into address components using a custom NLP model that learns from patterns. This library relies on the parserator library.

How to use fraddress

Install fraddress with pip.

pip install fraddress

Then parse some address with parse or tag.

>>> import fraddress
>>> fraddress.parse('51 rue Nationale Paris 75006')
[('51', 'AddressNumber'), ('rue', 'StreetType'), ('Nationale', 'StreetName'), ('Paris', 'City'), ('75006', 'Zipcode')]

>>> fraddress.tag('51 rue Nationale Paris 75006')
OrderedDict([('AddressNumber', '51'), ('StreetType', 'rue'), ('StreetName', 'Nationale'), ('City', 'Paris'), ('Zipcode', '75006')])

Check trained patterns

Go to the training directory and check the file trained_pattern.txt to see which pattern is already known by the model.

How to train a new parser

All you need is some training data to teach your parser about its domain, and then follow the instructions of the U.S version.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fraddress-0.0.4.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

fraddress-0.0.4-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file fraddress-0.0.4.tar.gz.

File metadata

  • Download URL: fraddress-0.0.4.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for fraddress-0.0.4.tar.gz
Algorithm Hash digest
SHA256 f60b779afb514d9aaa527bca9c1a625cacd2e59fd3019e0a2a848d691b6ebdf0
MD5 6f1f600f7bb9de20c82fb336a1a435d1
BLAKE2b-256 7714804f6a1004ad9f0801c38ae3f9809b670a5c102b80378b58f49dfa853e7a

See more details on using hashes here.

File details

Details for the file fraddress-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: fraddress-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for fraddress-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7cf30f8a8f6cd4549d3513c3879a489e66aaca06bd68c56288cd03add16fbd6b
MD5 e361419fce53fdcf1b0bd89a84ecd25c
BLAKE2b-256 a4922e6ab8d6c935531769075f8a6843ac4171f34b6b4223427edfc2a7e71476

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page