dmt-software / address-abbreviation
Abbreviate addresses while keeping the meaning intact.
Package info
github.com/dmt-software/address-abbreviation
pkg:composer/dmt-software/address-abbreviation
1.0.1
2026-06-03 09:04 UTC
Requires
- php: >=8.3
- ext-mbstring: *
Requires (Dev)
- phpunit/phpunit: ^12.5
- squizlabs/php_codesniffer: ^4.0
README
Abbreviate address components while preserving their meaning to accommodate systems with limited address length.
Installation
composer require dmt-software/address-abbreviation
Usage
use DMT\Address\Abbreviation\Dutch\Street\TypeNameAbbreviator; $abbreviator = new TypeNameAbbreviator(); print $abbreviator->abbreviate('Jan Maurits van Nassaustraat'); // outputs: Jan Maurits van Nassaustr
Configured sets
use DMT\Address\Abbreviation\AbbreviationGroupFactory; $abbreviator = (new AbbreviationGroupFactory())->getNen5825AbbreviationGroup(); print $abbreviator->abbreviate('Burgemeester W. van Eertenstraat'); // outputs: Burg W van Eertenstraat (according to NEN 5825:2002)