roottusk/slangdetect

PHP Web应用程序的俚语检测库

1.1.4 2019-01-13 10:24 UTC

This package is auto-updated.

Last update: 2024-09-29 05:21:30 UTC


README

Build Status MIT licensed Version

SlangDetect

PHP中一个俚语检测库,可以重复用于过滤任何脏话或检查文本片段。

安装

composer require roottusk/slangdetect

用法

require "lib/init.php";

ContainsBadWord($String)          //Returns count of bad words

IsBadWord($String)                //Returns boolean

StripBadWords($String,$Char)      //Strips Bad words from the provided text with given character.

StripOneWord($String,$Word,$Char) //Strips all the occurences of the provided word in the given text with given character