【文件属性】:
文件名称:内容审核:确定文本是否包含不良词
文件大小:47KB
文件格式:ZIP
更新时间:2021-02-18 07:31:40
PHP
内容审核
确定文本是否包含坏词。
安装
composer require monthly-basis/content-moderation
例子
独立PHP
<?php
require_once('vendor/autoload.php');
$containsBadWords = MonthlyBasis\ContentModeration\Model\Factory\ContainsBadWords::build();
$string = 'hello world';
if ($containsBadWords->containsBadWords($string)) {
echo 'Your string contains bad words!';
} else {
echo 'Phew, your string does not contain bad words.
【文件预览】:
content-moderation-master
----public()
--------index.php(1KB)
--------.htaccess(749B)
----src()
--------Module.php(9KB)
--------View()
--------Model()
----phpunit.xml.dist(218B)
----config()
--------autoload()
--------application.config.php(993B)
----composer.lock(106KB)
----test()
--------ModuleTest.php(273B)
--------View()
--------Model()
----README.md(736B)
----.gitignore(32B)
----composer.json(435B)