Download the PHP package noxxienl/nladdresslexer without Composer
On this page you can find all versions of the php package noxxienl/nladdresslexer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download noxxienl/nladdresslexer
More information about noxxienl/nladdresslexer
Files in noxxienl/nladdresslexer
Package nladdresslexer
Short Description Package to evaluate and parse dutch addresses
License MIT
Informations about the package nladdresslexer
Dutch address parser
Dutch address parser is a library to parse address lines into the segments street
, number
and suffix
.
Example:
Plein 1926 12 A
Will be parsed to:
Street | Number | Suffix |
---|---|---|
Plein 1926 | 12 | A |
Installation
Composer is used to install this package
Upgrade from 1.x
2.x requires a minimum of php 8.1
to run. Support for php 8 and lower has been dropped.
To upgrade from 1.x simply update your composer file with
and run:
Usage
Usage with splitting address
Sometimes you may have address that does not have the format street
, number
& suffix
. To let the parser correctly do its work you need to split the string on your own before the parser can do its work.
For example:
50 A, Ringweg Zuid / Rijksweg A20
Usage for splitting only numbers
Sometimes you may wish to split only the number
and suffix
. You can do so by setting the formatting of the parser to the following before executing the parsing:
Be carefull: When setting the address format, it is changed for every parsing to beyond that point. Reset the format to its original state when you want to parse a full address:
Testing
Testing is done using pestphp
. (https://pestphp.com/)
To run the tests.
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.
Bugs
Submit a issue to the github repository and if you can find the fix be sure to also submit a pull request!