PHPackages                             qfz9527/addressparser - 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. qfz9527/addressparser

ActiveLibrary

qfz9527/addressparser
=====================

中文收货地址智能识别

01PHP

Since Nov 21Pushed 2y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

AddressParser
=============

[](#addressparser)

[![Latest Version on Packagist](https://camo.githubusercontent.com/6da48bcb0c85d707805aeeab4e837620d0bd7d61164fe502055d1cdaa9ce1ee9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a6966616e2f616464726573737061727365722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zifan/addressparser)[![Total Downloads](https://camo.githubusercontent.com/bf208b90a77e0bedb5afd48d550d436322992010c0e6f2d5ed4d1de312701f04/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a6966616e2f616464726573737061727365722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zifan/addressparser)[![Build Status](https://camo.githubusercontent.com/82b40e47287cd81b137db038f3e67938c6080716ced3f498242a9d2b6a495166/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7a6966616e2f616464726573737061727365722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/zifan/addressparser)[![StyleCI](https://camo.githubusercontent.com/cb13a877afd1dbe223c631789c3f922d3ace958fdb334a9cce9b26afefbc2ebd/68747470733a2f2f7374796c6563692e696f2f7265706f732f31323334353637382f736869656c64)](https://styleci.io/repos/12345678)

中文收货地址智能识别
----------

[](#中文收货地址智能识别)

参考链接：

-  感谢作者的分享
-

Take a look at [contributing.md](contributing.md) to see a to do list.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.1.0
- Mbstring PHP Extension

Installation
------------

[](#installation)

Via Composer

```
$ composer require zifan/addressparser
```

Usage
-----

[](#usage)

$options = \['strict' =&gt; true\]

$parser = new AddressParser($options);

$parser-&gt;handle('浙江省杭州市滨江区西兴街道滨康路228号万福中心A座21楼');

Options
-------

[](#options)

Array $options Like:

```
[
    'dataProvider' => [
        'driver' => 'file'            // 驱动，默认file，其它方式（如数据模型）可自行扩展
        'path' => null,               // 指定省市区数据文件，默认从插件config文件夹中读取
    ],
    'enable_keywords_split' => false, // 是否启用关键词分割（适用于在淘宝、京东App上复制收货地址时开启，固定格式，拼多多不带关键字只是格式固定）
    'keywords' => [                   // enable_keywords_split 为 true 时才生效
        'person' => ['收货人', '收件人', '姓名'],
        'mobile' => ['手机号码', '手机', '联系方式', '电话号码', '电话'],
    ],
    'extra' => [                      // 额外提取字段
        'sub_district' => false,      // 村乡镇/街道（准确度低）
        'idn' => false,               // 身份证号
        'mobile' => false,            // 联系方式（手机号/座机号）
        'postcode' => false,          // 邮编
        'person' => false,            // 姓名（准确度低）
    ],
    'strict' => false,                // 是否对提取结果进行准确度校验、补齐
]
```

### 带关键字固定格式的收货地址示例

[](#带关键字固定格式的收货地址示例)

#### 京东格式

[](#京东格式)

姓名：张三
地址：浙江省杭州市滨江区 西兴街道 滨康路228号万福中心A座21楼

#### 淘宝格式

[](#淘宝格式)

收货人: 张三
手机号码: 158\*\*\*\*\*\*\*\*
所在地区: 浙江省杭州市滨江区西兴街道
详细地址: 滨康路228号万福中心A座21楼

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [zifan](https://github.com/a443939412)
- [All Contributors](../../contributors)

License
-------

[](#license)

MIT. Please see the [license file](license.md) for more information.

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity20

Early-stage or recently created project

 Bus Factor1

Top contributor holds 97.8% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/605889c14b71a45f23c0853ddb6cbbb6a24243cfd7d37244ddc3739b738ee7a3?d=identicon)[qfz9527](/maintainers/qfz9527)

---

Top Contributors

[![a443939412](https://avatars.githubusercontent.com/u/13361366?v=4)](https://github.com/a443939412 "a443939412 (45 commits)")[![qfz9527](https://avatars.githubusercontent.com/u/24431828?v=4)](https://github.com/qfz9527 "qfz9527 (1 commits)")

### Embed Badge

![Health badge](/badges/qfz9527-addressparser/health.svg)

```
[![Health](https://phpackages.com/badges/qfz9527-addressparser/health.svg)](https://phpackages.com/packages/qfz9527-addressparser)
```

PHPackages © 2026

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