L2 Hub
Pontus
analysis
Sentiment Analyzer

L2 Construct: sentiment_analyzer

sentiment analysis

Description

The sentiment analysis L2 evaluates text input to determine its emotional tone, classifying it as positive, neutral, or negative. It employs natural language processing techniques and pre-trained models to assess language, context, and word choices. The L2 outputs a classification along with a confidence score, enabling nuanced interpretation of the emotional content in the analyzed text.

L2 Data

  1. Provider: pontus
  2. Module: analysis
  3. Action: sentiment_analyzer

Example Step

{
  "name": "insert-your-step-name",
  "type": "l2",
  "l2_data": {
    "provider": "pontus",
    "module": "analysis",
    "action": "sentiment_analyzer"
  }
}
 

Input

Example

{
  "text": "This is the best day of my life!"
}
 

Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://pontus.bpa/pkgs/l2/pontus/analysis/sentiment-input",
  "$ref": "#/$defs/SentimentInput",
  "$defs": {
    "SentimentInput": {
      "properties": {
        "text": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": ["text"]
    }
  }
}
 

Output

Example

{
  "sentiment": "positive"
}
 

Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://pontus.bpa/pkgs/l2/pontus/analysis/sentiment-output",
  "$ref": "#/$defs/SentimentOutput",
  "$defs": {
    "SentimentOutput": {
      "properties": {
        "sentiment": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": ["sentiment"]
    }
  }
}