Text Profanity Detection

The Text Profanity Detection model will help you detect and replace the profane words in a given conversation or text.

API Request

post
https://api.marsview.ai/text/profanity
/get_profanity
Returns the predicted emotion for a given sentence

Example Curl Request

Shown below is a code snippet to send a sample request for profanity detection
curl --location --request POST 'https://api.marsview.ai/text/profanity/get_profanity' \
--header 'Content-Type: application/json' \
--data-raw '{
"jwtToken" : "Insert JWT token Key",
"sentence" : "Insert your text for profanity detection here",
"replaceChar": "The character you want to replace profane words with"
"userId" : "[email protected]"
}'

Example Response

Shown below is a sample JSON response from the above request.
{
"status": true,
"error": {},
"data": {
"censoredText": "This is some random ******** text",
"customProfaneWords": [
"bullshit"
],
"predefinedProfaneWords": []
},
"userId": "[email protected]"
}

Response Object

Field
Description
censoredText
The sentence / phrase for after censoring the profane words
customProfaneWords
List of custom profane words detected
predefinedProfaneWords
List of predefined profane words