{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adanos-market-sentiment-api/json-schema/adanos-market-sentiment-api-sentiment-analyze-response-schema.json",
  "title": "SentimentAnalyzeResponse",
  "description": "Direct text sentiment analysis response.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adanos-market-sentiment-api-finance-sentiment-api-openapi.yml#/components/schemas/SentimentAnalyzeResponse",
  "properties": {
    "text": {
      "type": "string",
      "title": "Text",
      "description": "Normalized input text that was analyzed"
    },
    "sentiment_score": {
      "type": "number",
      "maximum": 1.0,
      "minimum": -1.0,
      "title": "Sentiment Score",
      "description": "-1.0 bearish to +1.0 bullish"
    },
    "sentiment_label": {
      "type": "string",
      "enum": [
        "positive",
        "neutral",
        "negative"
      ],
      "title": "Sentiment Label",
      "description": "Adanos three-class sentiment label, matching top_mentions payloads"
    },
    "components": {
      "$ref": "#/$defs/SentimentComponents",
      "description": "Whitelisted finance sentiment engine components"
    }
  },
  "type": "object",
  "required": [
    "text",
    "sentiment_score",
    "sentiment_label",
    "components"
  ],
  "$defs": {
    "SentimentComponents": {
      "properties": {
        "engine_version": {
          "type": "string",
          "title": "Engine Version",
          "description": "Sentiment engine version"
        },
        "vader_compound": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 1.0,
              "minimum": -1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Vader Compound",
          "description": "VADER compound score after finance lexicon tuning"
        },
        "roberta_score": {
          "anyOf": [
            {
              "type": "number",
              "maximum": 1.0,
              "minimum": -1.0
            },
            {
              "type": "null"
            }
          ],
          "title": "Roberta Score",
          "description": "RoBERTa ONNX sentiment score when ensemble inference runs"
        },
        "emoji_score": {
          "type": "number",
          "maximum": 1.0,
          "minimum": -1.0,
          "title": "Emoji Score",
          "description": "Emoji-derived sentiment score"
        },
        "phrase_adjustment": {
          "type": "number",
          "title": "Phrase Adjustment",
          "description": "Directional finance phrase adjustment"
        },
        "phrase_matches": {
          "items": {
            "$ref": "#/$defs/SentimentPhraseMatch"
          },
          "type": "array",
          "title": "Phrase Matches",
          "description": "Directional finance phrases matched by the engine"
        },
        "contextual_finance_matches": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Contextual Finance Matches",
          "description": "Contextual finance phrases that dampened or informed scoring"
        }
      },
      "type": "object",
      "required": [
        "engine_version",
        "emoji_score",
        "phrase_adjustment"
      ],
      "title": "SentimentComponents",
      "description": "Whitelisted sentiment engine components exposed publicly."
    },
    "SentimentPhraseMatch": {
      "properties": {
        "phrase": {
          "type": "string",
          "title": "Phrase",
          "description": "Matched finance phrase"
        },
        "score": {
          "type": "number",
          "title": "Score",
          "description": "Internal phrase sentiment score"
        }
      },
      "type": "object",
      "required": [
        "phrase",
        "score"
      ],
      "title": "SentimentPhraseMatch",
      "description": "Whitelisted directional finance phrase metadata."
    }
  }
}