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
1
curl --location --request POST 'https://api.marsview.ai/text/profanity/get_profanity' \
2
--header 'Content-Type: application/json' \
3
--data-raw '{
4
"jwtToken" : "Insert JWT token Key",
5
"sentence" : "Insert your text for profanity detection here",
6
"replaceChar": "The character you want to replace profane words with"
7
"userId" : "[email protected]"
8
}'
Copied!

Example Response

Shown below is a sample JSON response from the above request.
1
{
2
"status": true,
3
"error": {},
4
"data": {
5
"censoredText": "This is some random ******** text",
6
"customProfaneWords": [
7
"bullshit"
8
],
9
"predefinedProfaneWords": []
10
},
11
"userId": "[email protected]"
12
}
Copied!

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