PubNub Profanity Filter lets you moderate chat messages in real time as they go over the PubNub Data Stream Network using our Serverless Functions. The function detects objectionable words in any given text, and lets you censor the content in a variety of different ways.
Whenever a user publishes a message, the function processes the text for profanity, and can then either block the publishing of the post, or censors the specific words.
When you publish a message, it triggers the function to check the content of the message against a dictionary of objectionable words. The function allows you to either replace a part of the text with special characters or completely block the message.
Input: Publish a message on any channel with a text field included.
Output: If profanity is present in the original message text, the output message will have the profanity filtered.
Set a channel to trigger the function. You can use wildcards (example * or chat.*) to trigger the function on multiple channels.
Click Start Module to start the Function, and test it using the Publish button and payload on the left.
For a more detailed overview of writing a function, refer to these instructions on the Functions Overview page.
You can select from a list of prebuilt Functions or build your own logic to restrict adult content on your application. Here are a few suggestions:
Sift Ninja is an API that integrates with chat, comments, gaming, and other social applications. Sift Ninja analyzes and filters text based on certain risk levels, and can then automatically moderate, hash out profanity, or mark as NSFW, all fully customizable.
Neutrino's Bad Word Filter API detects bad words, swear words, and profanity in given text, and censors it in a variety of different ways.
Sightengine's image moderation API allows you to moderate and filter user-generated photos for adult content, validation, and photo type.
Some Blocks require 3rd Party Service Sign-up
When Blocks integrate with 3rd party services, e.g. Amazon, Librato, MapBox or RingCentral, the 3rd party service often requires account setup in order to use. Please make sure to visit each BLOCK's documentation page, located at Blocks Catalog, in order to know what is required.