PHPackages                             firezihai/address-smart-parse - 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. firezihai/address-smart-parse

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

firezihai/address-smart-parse
=============================

地址智能识别

v1.0.0(3y ago)110MITPHP

Since Dec 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/firezihai/address-smart-parse)[ Packagist](https://packagist.org/packages/firezihai/address-smart-parse)[ RSS](/packages/firezihai-address-smart-parse/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

address-smart-parse
===================

[](#address-smart-parse)

使用默认数据源
=======

[](#使用默认数据源)

```
$address = '18000000000 贵州黔南州平塘县卡蒲毛南族乡河中村 李子海 ';

$smartParse = new AddressSmartParse();

$res = $smartParse->parse($address);

print_r($res);
//output:
/* Array
(
    [province] => 贵州省
    [city] => 黔南布依族苗族自治州
    [district] => 平塘县
    [town] => 卡蒲毛南族乡
    [mobile] => 18000000000
    [name] => 李子海
    [address] => 河中村
)
*/
```

自定义数据源
======

[](#自定义数据源)

```
class RegionService {

    public function getRegion($regionName)
    {

        $region = Region::query()->where('name','=',$name)->first(['id','name','parent_id']);
        return $region  ? $region->toArray() : '';

    }
}

$service = new RegionService();
$address = '18000000000 广东省中山市南头镇南头大道中59号 ';

$service = new RegionService();
$smartParse = new AddressSmartParse([$service,'getRegion']);
$res = $smartParse->parse($address);
print_r($res);

//output:
/* Array
(
    [province] => 广东省
    [city] => 中山市
    [district] =>
    [town] => 南头镇
    [mobile] => 18000000000
    [name] => 李子海
    [address] => 南头大道中59号
)
*/
```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

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

Unknown

Total

1

Last Release

1295d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/95ed582c23f06f22eb888b5c058dcf71433576112d21e7fc864cd26ef0644705?d=identicon)[firezihai](/maintainers/firezihai)

---

Top Contributors

[![firezihai](https://avatars.githubusercontent.com/u/9910490?v=4)](https://github.com/firezihai "firezihai (4 commits)")

---

Tags

phpaddress-smart-parse

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/firezihai-address-smart-parse/health.svg)

```
[![Health](https://phpackages.com/badges/firezihai-address-smart-parse/health.svg)](https://phpackages.com/packages/firezihai-address-smart-parse)
```

###  Alternatives

[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21623.4k](/packages/imanghafoori-laravel-anypass)

PHPackages © 2026

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