Search Response Schema

Search Response Schema for Sentiment Analysis

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "criteria": {
      "type": "string",
      "description": "The criteria or content for sentiment analysis."
    },
    "type": {
      "type": "string",
      "description": "The type of analysis being performed.",
      "enum": ["sentiment_analysys"]
    },
    "status": {
      "type": "string",
      "description": "The status of the sentiment analysis.",
      "enum": ["finished"]
    },
    "sources": {
      "type": "array",
      "description": "List of sources used for the sentiment analysis.",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the source."
          }
        },
        "required": ["name"]
      }
    },
    "data": {
      "type": "array",
      "description": "List of data objects containing sentiment analysis results.",
      "items": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "The original text that was analyzed."
          },
          "sentiment": {
            "type": "string",
            "description": "The sentiment result of the analysis.",
            "enum": ["NEGATIVE"]
          },
          "topic": {
            "type": "string",
            "description": "The topic or subject of the text."
          },
          "summary": {
            "type": "string",
            "description": "A brief summary of the text."
          },
          "entity": {
            "type": "string",
            "description": "The main entity or location mentioned in the text."
          },
          "status": {
            "type": "string",
            "description": "The status of the individual data item's analysis.",
            "enum": ["COMPLETED"]
          },
          "null": {
            "type": "boolean",
            "description": "Indicates if the data item is null or not."
          }
        },
        "required": ["text", "sentiment", "topic", "summary", "entity", "status", "null"]
      }
    }
  },
  "required": ["criteria", "type", "status", "sources", "data"]
}

Last updated