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

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

zenghuang19/sensitive-words
===========================

敏感词检测 敏感词替换

v1.6(6y ago)74.2k2MITPHPPHP &gt;=7.0.0

Since Jul 30Pushed 6y ago1 watchersCompare

[ Source](https://github.com/zenghuang19/sensitive-words)[ Packagist](https://packagist.org/packages/zenghuang19/sensitive-words)[ RSS](/packages/zenghuang19-sensitive-words/feed)WikiDiscussions master Synced today

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

Sensitive-words
===============

[](#sensitive-words)

Sensitive Fliter for Laravel5 based on [sensitive-words](https://github.com/zenghuang19/sensitive-words).

Install
-------

[](#install)

```
composer require zenghuang19/sensitive-words
```

Usage
-----

[](#usage)

Using facade:

```
require_once "../src/SensitiveWord.php";
$filename  = './words.txt';
$sensitive = new \Codetrainee\SensitiveWords\SensitiveWord();
$sensitive->addWords($filename);
$txt   = "鸡鸡";
$words = $sensitive->filter($txt);//敏感词替换
$word  = $sensitive->detection($txt);//敏感词检测
var_dump($words, $word);
```

百度开放平台内容审核
----------

[](#百度开放平台内容审核)

例子

```
$APP_ID = '百度AppID';
$API_KEY = 'API Key';
$SECRET_KEY = 'Secret Key';
$client = new AipImageCensor($APP_ID, $API_KEY, $SECRET_KEY);
$result = $client->textCensorUserDefined("测试文本");
dd($result);
if ($result['conclusionType'] != 1){
    //不合格的返回代码
}
```

个人账号 百度的文本审核是免费的，只限制QPS 图片审核每天限制2000张。企业账号未了解。更多使用方式及返回参数请查看 [百度官方文档](https://ai.baidu.com/docs#/ImageCensoring-PHP-SDK/418b8ff4)

##### laravel-admin 文本检查开发中

[](#laravel-admin-文本检查开发中)

License
-------

[](#license)

MIT

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

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 ~1 days

Total

5

Last Release

2470d ago

PHP version history (2 changes)v1.0PHP &gt;=5.6

v1.1PHP &gt;=7.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/d6b8527b9d0e1e82edbb1e1550dcdf55ad73e9973205155a0199744dd9de1530?d=identicon)[codeTrainee](/maintainers/codeTrainee)

---

Top Contributors

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

---

Tags

laravelextensionlaravel-adminsensitive

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[codingyu/ueditor

UEditor extension for laravel-admin

6471.6k](/packages/codingyu-ueditor)[jxlwqq/simditor

Simditor for Laravel-admin

1629.0k1](/packages/jxlwqq-simditor)

PHPackages © 2026

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