PHPackages                             snstvwd/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. [Search &amp; Filtering](/categories/search)
4. /
5. snstvwd/filter

ActiveLibrary[Search &amp; Filtering](/categories/search)

snstvwd/filter
==============

PHP基于确定有穷自动机算法（DFA）的敏感词过滤器

v1.0.1(7y ago)31.3k2MITPHPPHP &gt;=5.6

Since Jun 19Pushed 7y agoCompare

[ Source](https://github.com/6xiaowu9/snstvwd)[ Packagist](https://packagist.org/packages/snstvwd/filter)[ RSS](/packages/snstvwd-filter/feed)WikiDiscussions master Synced 2mo ago

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

敏感词过滤器
======

[](#敏感词过滤器)

PHP基于确定有穷自动机（DFA）敏感词过滤器，支持 Laravel 框架。

> ## 安装
>
> [](#安装)

### 1. 利用composer安装包

[](#1-利用composer安装包)

```
$ composer require snstvwd/filter

```

### 2. 在config/app.php 里面添加：

[](#2-在configappphp-里面添加)

```

    'providers' => [
        .
        .
        .
        Snstvwd\Filter\Providers\FilterSerivceProvider::class
    ],

    'aliases' => [
        .
        .
        .
        'Filter' => Snstvwd\Filter\Facades\Filter::class
    ]

```

### 3. 创建配置文件

[](#3-创建配置文件)

```
php artisan vendor:publish --provider="Snstvwd\Filter\Providers\FilterSerivceProvider"

```

### 4. 基本使用

[](#4-基本使用)

```

use Filter;

public function test () {
    $text = '他是傻逼吗？';
    $filter = Filter::filter($text)->getText();
    dump($filter);
}

```

### 返回实例

[](#返回实例)

```
他是???吗？

```

文档
--

[](#文档)

### [配置文件](./doc/setting.md)

[](#配置文件)

### [Filter的使用指南](./doc/filter.md)

[](#filter的使用指南)

### [FilterWrod的使用指南](./doc/filterword.md)

[](#filterwrod的使用指南)

THANK YOU
---------

[](#thank-you)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

2

Last Release

2888d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cd561b2d1d9aa9829ff6ddcfbd62506bc7eec2b02e65abd97599673040fdfc81?d=identicon)[6xiaowu9](/maintainers/6xiaowu9)

---

Top Contributors

[![6xiaowu9](https://avatars.githubusercontent.com/u/23273601?v=4)](https://github.com/6xiaowu9 "6xiaowu9 (5 commits)")

---

Tags

filterdfasensitive word

### Embed Badge

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

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

###  Alternatives

[clue/stream-filter

A simple and modern approach to stream filtering in PHP

1.7k261.7M7](/packages/clue-stream-filter)[laminas/laminas-filter

Programmatically filter and normalize data and files

9428.0M150](/packages/laminas-laminas-filter)[friendsofcake/search

CakePHP Search plugin using PRG pattern

1742.0M37](/packages/friendsofcake-search)[htmlawed/htmlawed

Official htmLawed PHP library for HTML filtering

401.1M9](/packages/htmlawed-htmlawed)[outl1ne/nova-multiselect-filter

Multiselect filter for Laravel Nova.

45802.7k3](/packages/outl1ne-nova-multiselect-filter)[outl1ne/nova-input-filter

An input filter for Laravel Nova

24822.7k](/packages/outl1ne-nova-input-filter)

PHPackages © 2026

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