PHPackages                             itplato/phpanalysis - 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. itplato/phpanalysis

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

itplato/phpanalysis
===================

php chinese analysis, It's component-free word segmentation in language-php

v5.0\_alpha(6y ago)167619MITTSQLPHP &gt;=5.3.0

Since Jun 1Pushed 6y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (3)Used By (0)

PHPAnalysis php中文无组件分词类
=======================

[](#phpanalysis-php中文无组件分词类)

一、最新变化
------

[](#一最新变化)

```
1、修改源文件结构支持composer
2、把切分同时优化的操作模式改为独立步骤操作(即是粗分、切分、优化三步完全独立)
3、修改类成员调用支持自身引用，即是 xx()->xx()->xx() 模式
```

二、一个基本的分词操作
-----------

[](#二一个基本的分词操作)

```
use Tutu\PhpAnalysis;
header('content-type:text/html;charset=utf-8');
$result_str = PhpAnalysis::Instance()
              ->SetSource("composer的出现真是让人们眼前一亮，web开发从此变成了一件很『好玩』的事情。")
              ->Delimiter(' ')
              ->ExecSimpleAnalysis()
              ->ExecDeepAnalysis()
              ->Optimize( true );
echo $result_str;

如果用默认参数，上面也可以简化为：
$result_str = PhpAnalysis::Instance()
              ->SetSource("composer的出现真是让人们眼前一亮，web开发从此变成了一件很『好玩』的事情。")
              ->Exec();
```

三、常用设置及方法
---------

[](#三常用设置及方法)

- Instance( $force\_init = false )

```
```

- SetOptions($unit\_special\_word=true, $unit\_single\_word=false, $max\_split=false, $high\_freq\_priority=false, $optimize=true)

```
```

- SetSource($source, $source\_encoding = 'utf-8', $target\_encoding='utf-8')

```
```

- Delimiter( $str )

```
```

- Exec( $return = true )

```
```

- LoadDict( $main\_dic\_file = '' )

```
```

- AssistBuildDict( $source\_file, $target\_file='' )

```
```

- AssistExportDict( $target\_file, $dicfile = '' )

```
```

- AssistGetCompare()

```
```

- AssistGetDeep()

```
```

- AssistGetSimple( $string=true )

```
```

- GetNewWords( $is\_array=false )

```
```

- GetResult()

```
```

- GetResultProperty()

```
```

- GetTags( $num = 10, $with\_rank = false )

```
```

```

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

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

Every ~32 days

Total

2

Last Release

2511d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/436344b532fc902dff1a2028363372a7960135f6d03eebb8af9f4ac0d55adeeb?d=identicon)[it.plato](/maintainers/it.plato)

---

Top Contributors

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

---

Tags

analysissegmentationword segmentation

### Embed Badge

![Health badge](/badges/itplato-phpanalysis/health.svg)

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

###  Alternatives

[dephpend/dephpend

Dependency analysis for PHP

534101.9k2](/packages/dephpend-dephpend)[vanderlee/php-sentence

Simple text sentence splitting and counting. Supports at least english, german and dutch, possibly more.

84555.7k6](/packages/vanderlee-php-sentence)[paragonie/random-lib

A Library For Generating Secure Random Numbers

703.3M26](/packages/paragonie-random-lib)[kartik-v/bootstrap-tabs-x

Extended Bootstrap Tabs with ability to align tabs in multiple ways, add borders, rotated titles, and more.

1021.3M1](/packages/kartik-v-bootstrap-tabs-x)[undefinedoffset/sortablegridfield

Adds drag and drop functionality to Silverstripe's GridField

941.2M50](/packages/undefinedoffset-sortablegridfield)

PHPackages © 2026

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