{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/SentimentSegment",
  "title": "SentimentSegment",
  "type": "object",
  "properties": {
    "text": {
      "type": "string",
      "description": "Text of the segment."
    },
    "start_word": {
      "type": "integer",
      "description": "Index of the first word in this segment."
    },
    "end_word": {
      "type": "integer",
      "description": "Index of the last word in this segment."
    },
    "sentiment": {
      "type": "string",
      "enum": [
        "positive",
        "negative",
        "neutral"
      ],
      "description": "Overall sentiment of the segment."
    },
    "sentiment_score": {
      "type": "number",
      "format": "float",
      "description": "Confidence score for the sentiment classification."
    }
  }
}