PHPackages                             easyswoole/words-match - 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. [Framework](/categories/framework)
4. /
5. easyswoole/words-match

ActiveLibrary[Framework](/categories/framework)

easyswoole/words-match
======================

An efficient swoole framework

1.1.5(3y ago)171.6k5[7 issues](https://github.com/easy-swoole/words-match/issues)2Apache-2.0PHP

Since Oct 24Pushed 3y agoCompare

[ Source](https://github.com/easy-swoole/words-match)[ Packagist](https://packagist.org/packages/easyswoole/words-match)[ Docs](https://www.easyswoole.com/)[ RSS](/packages/easyswoole-words-match/feed)WikiDiscussions 1.1.x Synced today

READMEChangelog (9)Dependencies (4)Versions (11)Used By (2)

   title easyswoole 内容检测   meta       name content     description

 easyswoole 内容检测

    name content     keywords

 swoole|easyswoole|内容检测|敏感词|检测

    words-match
===========

[](#words-match)

words-match组件是基于字典树(DFA)并利用UnixSock通讯和自定义进程实现，开发本组件的目的是帮小伙伴们快速部署内容检测服务。

使用场景
----

[](#使用场景)

跟文字内容相关的产品都有应用场景。

比如：

博客类的文章，评论的检测

聊天内容的检测

对垃圾内容的屏蔽

安装
--

[](#安装)

```
composer require easyswoole/words-match

```

准备词库
----

[](#准备词库)

服务启动的时候会一行一行将数据读出来，每一行的第一列为敏感词，其它列为附属信息

```
php,是世界上,最好的语言
java
golang
程序员
代码
逻辑
php※程序员

```

代码示例
----

[](#代码示例)

```
use EasySwoole\WordsMatch\Config;
use EasySwoole\WordsMatch\WMServer;

require 'vendor/autoload.php';

$http = new Swoole\Http\Server("127.0.0.1", 9501);

$config = new Config();

$config->setDict(__DIR__.'/tests/dictionary.txt');

WMServer::getInstance($config)->attachServer($http);

$http->on("request", function ($request, $response) {
    if(isset($request->get['world'])){
        $world = $request->get['world'];
    }else{
        $world = "计算机①级考试🐂替考+++++++++++++我";
    }
    $ret = WMServer::getInstance()->detect($world);
    $response->header("Content-Type", "application/json;charset=utf-8");
    $response->write(json_encode($ret,JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES));
});

$http->start();
```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance12

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 60.6% 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 ~146 days

Recently: every ~226 days

Total

10

Last Release

1133d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/45c234d5f129ea570e630425636299127647534f0c2cbb073555e2c45d403d6f?d=identicon)[kiss291323003](/maintainers/kiss291323003)

---

Top Contributors

[![huizhang001](https://avatars.githubusercontent.com/u/26496638?v=4)](https://github.com/huizhang001 "huizhang001 (57 commits)")[![kiss291323003](https://avatars.githubusercontent.com/u/24490609?v=4)](https://github.com/kiss291323003 "kiss291323003 (37 commits)")

---

Tags

asyncframeworkswooleeasyswoole

### Embed Badge

![Health badge](/badges/easyswoole-words-match/health.svg)

```
[![Health](https://phpackages.com/badges/easyswoole-words-match/health.svg)](https://phpackages.com/packages/easyswoole-words-match)
```

###  Alternatives

[easyswoole/easyswoole

An efficient swoole framework

4.8k190.3k55](/packages/easyswoole-easyswoole)[easyswoole/rpc

An efficient swoole framework

7732.9k2](/packages/easyswoole-rpc)[easyswoole/kafka

An efficient swoole framework

4211.5k](/packages/easyswoole-kafka)[easyswoole/orm

php stander lib

3090.9k27](/packages/easyswoole-orm)[easyswoole/fast-cache

An efficient swoole framework

1030.7k4](/packages/easyswoole-fast-cache)[easyswoole/actor

easyswoole component

1410.4k](/packages/easyswoole-actor)

PHPackages © 2026

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