PHPackages                             text\_filter/badword - 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. text\_filter/badword

ActiveLibrary

text\_filter/badword
====================

Detection and filtering of prohibited words

v1.0.4(2y ago)17MITPHP

Since Aug 21Pushed 2y ago1 watchersCompare

[ Source](https://github.com/belongsMe/badword)[ Packagist](https://packagist.org/packages/text_filter/badword)[ RSS](/packages/text-filter-badword/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (5)Used By (0)

TextFilter
==========

[](#textfilter)

Installation
------------

[](#installation)

Use composer to manage your dependencies and download `TextFilter\Badword`:

```
composer require TextFilter/Badword
```

Ensure that you have installed the Redis extension

Example
-------

[](#example)

```
use TextFilter\Badword\Badword;

$config = [
    'host'=>'127.0.0.1',
    'port'=>'6379',
    'password'=>'',
    'select'=>0,
    'expire'=>3600,
];
$filter = new Badword($config);
//$filter->loadData(['枪手','电击枪']);
$filter->setDictFile('./file.txt');
$filter->loadDataFromFile(true);
//$filter->match_badword("枪手",0);
$filter->filter("枪手",'*', 0);
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

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

Every ~0 days

Total

4

Last Release

1002d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a54667b374743d3bf78c8f4382cd30241b9b25a413bc81aaec59ab05aad1e81?d=identicon)[belongsMe](/maintainers/belongsMe)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/text-filter-badword/health.svg)

```
[![Health](https://phpackages.com/badges/text-filter-badword/health.svg)](https://phpackages.com/packages/text-filter-badword)
```

PHPackages © 2026

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