Skip to content

jamesf408/profanity_checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

Profanity Checker v1.0

Live example: Profanity Checker Sample Link

User-Friendly form based example: Profanity checker user friendly link

=================

Check profanity in a given string. Will return a json object, a plain text object, or a boolean if a string contains profanity within the profanity list in the ProfanityChecker class.

Use

____________

JSON object:

yourwebsite.com/profanitychecker.php?json=Some text badword

json results:
{"output":"some text _____"}

If profanity is found it will replace the word with "_____" as a default. This can be changed adding an additional variable to the link. yourwebsite.com/profanitychecker.php?json=Some text badword&options= This will replace the default characters with "".

json results:
{"output":"some text ***"}


Plain Text object:

yourwebsite.com/profanitychecker.php?plain=Some text badword

plain text result:

some text ______

With optional character replacement.
yourwebsite.com/profanitychecker.php?plain=Some text badword&options=***

plain text with options result:

some text ***

Has Profanity (True, False)

yourwebsite.com/profanitychecker.php?check=Some text badword

check json results:
{"hasProfanity":true}


TO DO

  • Fix method to add punctuation once stripped in a string
  • Update profanity list
  • Possibly create database file of profanity list
  • Remove profanity list from ProfanityChecker class

About

Check profanity in a given string

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages