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

Returns the predicted emotion for a given sentence

POST https://api.marsview.ai/text/profanity/get_profanity

Query Parameters

{
    "status": true,
    "error": {},
    "data": {
        "censoredText": "This is some random ******** text",
        "customProfaneWords": [
            "bullshit"
        ],
        "predefinedProfaneWords": []
    },
    "userId": "chandra.sekhar@marsview.ai"
}

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"     : "demo@marsview.ai"
}'

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": "chandra.sekhar@marsview.ai"
}

Response Object

Last updated