• Text Moderation

    Analyze and return probability scores that text contains concepts such as toxic, insult, obscene and threat. Use this model to moderate content and ensure the exclusion of profanity, threatening language and other unwanted text.

    Start now for free Contact us

    5,000 free operations per month.

nlp-text-classification-model

Request


You can call the Predict API with the "Text Moderation" model. Simply pass in a text input with a publicly accessible URL or by directly sending raw text, .csv or .tsv files. You can learn more about the Predict API in our API Guide

Python JS cURL
1
// Python
model = app.models.get('c1a2ac2adba0204d859fb89fd44d6ac9')
text = "This is a text string"
model.predict([text])

Response

The Predict API returns a list of concepts (Toxic, Insult, Obscene, Indentity_hate, Severe_toxic, Threat) with their corresponding probability scores on the likelihood that these concepts are contained within the text.

Response
1
// Response
{ "status":
 { "code": 10000,
   "description": "Ok",
   "req_id": "req_id"
 },
 "outputs": [
   {"id": "input_id",
     "status": {
       "code": 10000,
       "description":"Ok"
     },
     "created_at": "DATE",
     "model": {
       "id" : "ifjaow;f",
       "name": "owiajefoiaw",
       "created_at": "DATE",
       "app_id": "app_id",
       "output_info": {
        "output_config": {
           "concepts_mutually_exclusive": false,
           "closed_environment": true,
           "max_concepts": 0,
           "min_value": 0
         },
         "message": "Show output_info with: GET /models/{model_id}/output_info",
         "type": "concept",
         "type_ext": "concept"
       },
       "input_info":{},
       "train_info":{},
       "model_type_id": "embedding-classifier"
     },
     "input":{
       "id":"13bfb782134e44e98a7955c98da7d490",
       "data":{
         "text":{
           "raw":"this is a text string",
         }
       }
     },
     "data":{
       "concepts":[
         {"id":"CONCEPT_ID",
         "name":"CONCEPT_NAME",
         "value":0.99375314,
         "app_id":"APP_ID"
         },
       ]
     }
   }
 ]
}

Component

Description

Model

The model you are using to make predictions on your inputs with. Includes the id, name, created_at date, output info, and information on the model version.

Input

The text data that you passed through the model to make predictions. Includes id and the image data.

Data

The data sent back with the response; usually includes the detected concepts and corresponding probability values. (If the model's output type is not concepts, you'll see different output responses here.)

Endless possibilities with Computer Vision and AI

Gather valuable business insights from images, text and data using machine learning, natural language processing and computer vision.

  • Ready-to-use Models
  • Text embedding

    Assign tags or categories to analyze text based on content. Build models for topic analysis, sentiment analysis, smart reply and more.

    Try it out
  • Image moderation

    Identify unwanted content such as gore, drugs, explicit nudity or suggestive nudity.

    Try it out
  • General

    Recognize over 11,000 different concepts including objects, themes, moods and more.

    Try it out
  • Custom

    Create your own model and teach it with your own images and concepts.

    Try it out
  • Demographics

    Predict the age, gender or cultural appearances of faces.

    Try it out
  • Face detection

    Detect the location of faces with bounding boxes.

    Try it out
  • Celebrity

    Analyze images and return probability scores on the likelihood that the media contains the face(s) of over 10,000 recognized celebrities.

    Try it out
  • Apparel detection

    Detect items of clothing or fashion-related items.

    Try it out
  • Face embedding

    Analyze images and returns numerical vectors that represent each detected face in the image in a 1024-dimensional space.

    Try it out
  • Food

    Recognize more than 1,000 food items in images down to the ingredient level.

    Try it out
  • Color

    Identify the dominant colors present in your images in hex or W3C form.

    Try it out
  • Textures and patterns

    Recognize textures and patterns in a two-dimensional image e.g., feathers, woodgrain, petrified wood, glacial ice and overarching descriptive concepts (veined, metallic).

    Try it out
  • Not safe for work

    Identify different levels of nudity in your visual data. Ideal for moderating and filtering offensive content from your platform.

    Try it out
  • Travel

    Recognize specific features of residential, hotel, and travel-related properties.

    Try it out
  • Wedding

    Recognize over 400 concepts related to weddings including bride, groom, flowers and more.

    Try it out
  • General embedding

    Analyze images and returns numerical vectors that represent each detected face in the image in a 1024-dimensional space computed by our General model.

    Try it out
  • Model gallery

    Explore our pre-built, ready-to-use image recognition models to suit your specific needs.

    Learn more
  • Ready to get started?

    Whether you're a start-up or a Fortune 500, we'd like to discuss a personalized plan that fits your business use cases.

    Learn more about Clarifai

    Schedule a demo

    Discuss your solutions options

  • or
    Start now for free

     

    5,000 free operations per month.

  • Already a customer?

    If you're encountering a technical or payment issue, the customer support team will be happy to assist you.

    Contact support