PHPackages                             michielgerritsen/extract-address-parts - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. michielgerritsen/extract-address-parts

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

michielgerritsen/extract-address-parts
======================================

Get the (Dutch) street, house number, and extension from a concatenated string

v1.0.6(11mo ago)99.3k↓35.7%1WTFPLPHPPHP ^7.0|^8.0CI failing

Since Jun 25Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/michielgerritsen/extract-address-parts)[ Packagist](https://packagist.org/packages/michielgerritsen/extract-address-parts)[ RSS](/packages/michielgerritsen-extract-address-parts/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (8)Used By (0)

[![](https://github.com/michielgerritsen/extract-address-parts/workflows/Test/badge.svg)](https://github.com/michielgerritsen/extract-address-parts/workflows/Test/badge.svg)

Extract information from Dutch addresses
========================================

[](#extract-information-from-dutch-addresses)

I have been in this situation multiple times: You need to provide an housernumber and addition for some API. But the provided dataset only has the complete address. This library tries to solve this issue. For instance:

- Kerkstraat 95A
    - Street: `Kerkstraat`
    - Housenumber: `95`
    - Addition: `A`

This library has 3 ways available to extract the data:

- `AddressExtraction` - The default. Tries to extract by using regex.
- `PrecisionAddressExtraction` - This uses library files with all known Dutch streetnames and tries to match them.
- `CombinedAddressExtraction` - A combination of the previoius 2: It tries the `PrecisionAddressExtraction` first, and if that fails, fallsback to the `AddressExtraction`.

This is a lightweight repository, it has no external dependencies, except for PHPUnit for testing.

Installation
============

[](#installation)

`composer require michielgerritsen/extract-address-parts`

Usage
=====

[](#usage)

AddressExtraction
-----------------

[](#addressextraction)

```
use MichielGerritsen\ExtractAddressParts\AddressExtraction;
use MichielGerritsen\ExtractAddressParts\PrecisionAddressExtraction;
use MichielGerritsen\ExtractAddressParts\CombinedAddressExtraction;
use MichielGerritsen\ExtractAddressParts\VO\AddressExtractionResult;
use MichielGerritsen\ExtractAddressParts\Exceptions\AddressExtractionError;

/** @var AddressExtractionResult $result */
try {
  $result = (new AddressExtraction())->process(['Kerkstraat 95A']);
  $result = (new PrecisionAddressExtraction())->process(['Kerkstraat 95A']);
  $result = (new CombinedAddressExtraction())->process(['Kerkstraat 95A']);
} catch (AddressExtractionError $exception) {
  die('Uh oh, this address seems to be invalid.');
}

$result->getStreet(); // Kerkstraat
$result->getHousenumber(); // 95
$result->getAddition(); // A
```

Contributing
============

[](#contributing)

Pull the repository, run `composer install`. Testing can be done by `composer test`.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance52

Moderate activity, may be stable

Popularity32

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 70% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~303 days

Recently: every ~373 days

Total

7

Last Release

332d ago

PHP version history (2 changes)v1.0.0PHP ^7.0

v1.0.2PHP ^7.0|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/ea5f9f50d4d50caa56065f4b55b1dd5aa3f1030402d0487a093200fdefa40f70?d=identicon)[michielgerritsen](/maintainers/michielgerritsen)

---

Top Contributors

[![michielgerritsen](https://avatars.githubusercontent.com/u/5858697?v=4)](https://github.com/michielgerritsen "michielgerritsen (21 commits)")[![rikwillems](https://avatars.githubusercontent.com/u/5927342?v=4)](https://github.com/rikwillems "rikwillems (7 commits)")[![rikwillems-redkiwi](https://avatars.githubusercontent.com/u/102238548?v=4)](https://github.com/rikwillems-redkiwi "rikwillems-redkiwi (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/michielgerritsen-extract-address-parts/health.svg)

```
[![Health](https://phpackages.com/badges/michielgerritsen-extract-address-parts/health.svg)](https://phpackages.com/packages/michielgerritsen-extract-address-parts)
```

###  Alternatives

[phpwhois/phpwhois

phpWhois - library for querying whois services and parsing results. Based on phpwhois.org

322392.6k1](/packages/phpwhois-phpwhois)[cakedc/tiny-mce

TinyMCE Plugin for CakePHP

10790.2k](/packages/cakedc-tiny-mce)[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21421.6k](/packages/imanghafoori-laravel-anypass)[rasteiner/k3-whenquery

Conditionally show fields and sections. Better.

6717.8k](/packages/rasteiner-k3-whenquery)[dragon-code/size-sorter

Easily sort clothing size, height, bra size, furniture size and more

3915.4k](/packages/dragon-code-size-sorter)[geeklabs/ci4-breadcrumbs

Breadcrumb navigation for CodeIgniter 4

2813.5k](/packages/geeklabs-ci4-breadcrumbs)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
