PHPackages                             xiaobinqt/sensitive-words-filter - 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. xiaobinqt/sensitive-words-filter

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

xiaobinqt/sensitive-words-filter
================================

sensitive words filter

0.0.1(6y ago)24MITPHP

Since Jul 25Pushed 6y agoCompare

[ Source](https://github.com/xiaobinqt/sensitive-words-filter)[ Packagist](https://packagist.org/packages/xiaobinqt/sensitive-words-filter)[ RSS](/packages/xiaobinqt-sensitive-words-filter/feed)WikiDiscussions master Synced 2d ago

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

 sensitive-words-filter
========================

[](#-sensitive-words-filter-)

 sensitive words filter.

Installing
----------

[](#installing)

```
$ composer require xiaobinqt/sensitive-words-filter -vvv
```

Usage
-----

[](#usage)

```
use Xiaobinqt\SensitiveWordsFilter\SensitiveWordsFilter;

$haystack = "淫色 | ?  [] sdfs0221。？！，、；：「」『』“”‘’（）【】《》〈〉    电影";
$obj = new SensitiveWordsFilter();
try {
    $ret = $obj->filter($haystack);
    var_dump($ret);
} catch (Exception $exception) {
    // TODO
}
```

Return Resource
---------------

[](#return-resource)

```
array(
    'costTimeMs'     => 21571.157217026,
    'sensitiveWords' => "淫色电影"
);
```

Advanced usage
--------------

[](#advanced-usage)

- 自定义敏感词文件

```
$senPath = __DIR__ . DIRECTORY_SEPARATOR . 'mysen.txt';
$obj = new SensitiveWordsFilter($senPath);
```

- 自定义敏感词数组

```
$obj = new SensitiveWordsFilter(null, array("台湾独立建国"));

```

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

[](#contributing)

You can contribute in one of three ways:

1. File bug reports using the [issue tracker](https://github.com/xiaobinqt/sensitive-words-filter/issues).
2. Answer questions or fix bugs on the [issue tracker](https://github.com/xiaobinqt/sensitive-words-filter/issues).
3. Contribute new features or update the wiki.

*The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.*

License
-------

[](#license)

MIT

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

2484d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23259661?v=4)[萧十一郎](/maintainers/xiaobinqt)[@xiaobinqt](https://github.com/xiaobinqt)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/xiaobinqt-sensitive-words-filter/health.svg)

```
[![Health](https://phpackages.com/badges/xiaobinqt-sensitive-words-filter/health.svg)](https://phpackages.com/packages/xiaobinqt-sensitive-words-filter)
```

###  Alternatives

[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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