quansitech / qs-sensitive
sensitive words
Installs: 1 024
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: >=7.0
This package is auto-updated.
Last update: 2024-11-23 16:50:44 UTC
README
安装
composer require quansitech/qs-sensitive
用法
$sensitive = new Senstive(); $txt = "你是不是傻&吊。。。"; $words = $sensitive->filter($txt); echo $words; // 你是不是***。。。
自定义干扰因子和敏感词库
$disturbList = ['!', '(', ')']; $words = './words.txt'; $sensitive = new Senstive($disturbList, $words); $txt = "你是不是傻(!)吊。。。"; $words = $sensitive->filter($txt); echo $words; //你是不是*****。。。