PHPackages                             mr-jiawen/analysis - 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. mr-jiawen/analysis

ActiveLibrary

mr-jiawen/analysis
==================

1.0.3(8y ago)044MITPHP

Since Nov 1Pushed 8y ago1 watchersCompare

[ Source](https://github.com/MrJiawen/analysis)[ Packagist](https://packagist.org/packages/mr-jiawen/analysis)[ RSS](/packages/mr-jiawen-analysis/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

analysis php分词系统
================

[](#analysis-php分词系统)

> 本分词系统是依赖于 [PHPBONE开发框架的PHPAnalysis无组件分词系统](http://www.phpbone.com/phpanalysis/#api)，笔者直接引用了他的SDK(V2.0版本)进行再次封装，直接封装到composer中：

```
composer require mr-jiawen/analysis
```

第一部分 项目制作
---------

[](#第一部分-项目制作)

1. 重写整个src/SDK/phpanalysis.class.php 文件：

    - 重写文件为：`src/AnalysisAbstraction.php`
    - 去除 两个宏定义；
    - 其余的不变
2. 提供对一个对外的类提供分词服务：PhpAnalysis.php

    - 重写字典所在的目录
    - 然后提供一个简易的执行方法

补充：在sdk中`dict_build.php`是未使用到

第二部分 具体的使用方式：
-------------

[](#第二部分-具体的使用方式)

获取单例对象：

```
$ananlysis = PhpAnalysis::getInstance();
```

执行分词：

```
$result = $ananlysis->cut('好好学习天天上上');  // 最初的分词结果
$result = $ananlysis->cut('好好学习天天上上','encode_array');   //转码到utf8并且去除特殊字符，得到其字符串结果
$result = $ananlysis->cut('好好学习天天上上','encode_array');   //转码到utf8并且去除特殊字符，得到其数组结果

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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

Every ~0 days

Total

2

Last Release

3110d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/mr-jiawen-analysis/health.svg)

```
[![Health](https://phpackages.com/badges/mr-jiawen-analysis/health.svg)](https://phpackages.com/packages/mr-jiawen-analysis)
```

PHPackages © 2026

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