2017 © Pedro Peláez
 

library censorship

This package can clean all non-normative lexis from your texts

image

pavelpage/censorship

This package can clean all non-normative lexis from your texts

  • Friday, April 27, 2018
  • by pavelpage
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Censor

This package could be used for cleaning obscene language from user messages., (*1)

Usage

Installation

Simply install it using composer command:, (*2)

composer require "pavelpage/censorship:dev-master", (*3)

Usage

You have to options for using this package:, (*4)

Replace obscene words, (*5)

$censor = new Censor();
$text = "some text";

$censor->clean($text);// will replace obscene words in your text

Check the text, (*6)

$censor = new Censor();
$text = "some text";

$censor->hasObsceneWords($text);

Configuration

You have a few abilities to add functionality if you think, that package doesn't solute your problems., (*7)

Here are some parameters which you can replace in the config file:, (*8)

Parameter Value
default_obscene_patterns default patterns which used to detect obscene words
obscene_patterns you can add your own patterns to find obscene words
replace_pattern place symbols which will replace obscene words
obscene_words simply write words which should be replaced
except_words also, you can exclude some words from checking

$censor = new Censor(['param_name' => []);// just send your custom configuration parameters to __construct method of controller

Demo:

You can visit this site demo and check how it is working., (*9)

Notice:

Now package works only with russian language, feel free to add english patterns or use some patterns from the examples directory(english.php)., (*10)

The Versions

27/04 2018

dev-master

9999999-dev

This package can clean all non-normative lexis from your texts

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by Pavel Ivanov

27/04 2018

1.0.0

1.0.0.0

This package can clean all non-normative lexis from your texts

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by Pavel Ivanov