bureaupartners / extract-address-from-text
With this package you can extract the address from a unformatted text string
Fund package maintenance!
Patreon
Installs: 2 449
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^7.2 | ^8.0
Requires (Dev)
- phpunit/phpunit: ^8.2
- pragmarx/countries: ^0.8
README
With this package you can extract the address from a unformatted text string
Installation
Install composer packages
composer require bureaupartners/extract-address-from-text
Usage
use BureauPartners\ExtractAddressFromText\AddressExtractor; $extractor = new AddressExtractor($address['text']); $extractor->getAddress(); // Get all information $extractor->getRecipient(); $extractor->getStreet(); $extractor->getHouseNumber(); $extractor->getHouseNumberAddition(); $extractor->getPostalCode(); $extractor->getCity(); $extractor->getCountry()['code'];
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
See LICENSE.md