Sentiment analysis for surveys

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 3분
  • You can use sentiment analysis to determine whether user responses for a survey are considered positive, negative, or neutral.

    Activate the Sentiment Analysis (com.snc.sentiment_analysis) plugin.

    For a survey, you can select questions that should be used for analysis. The survey responses of these questions are sent to the thirdparty platforms for analysis through the specified connector configurations.

    주:
    You can only use string type questions for sentiment analysis.
    The sentiment analysis results are displayed under Survey > Question Sentiment Results. The sentiment label is based on the normalized score:
    표 1. Sentiment label
    Normalized score Sentiment label
    -1 to 0 Negative
    0 Neutral
    0 to 1 Positive

    API Version and Score Calculation

    Currently, this plugin uses the MSAzure text analytics API (v2), which is now deprecated. To ensure continued functionality and compatibility, we are migrating to the newer v3 API.

    v2 API response format:

    
                   {
                   "documents": [
                   {
                   "id": "1",
                   "score": 0.14829033613204956
                   }
                   ],
                   "errors": []
                   }
                

    v3 API response format:

    
                   {
                   "documents": [
                   {
                   "id": "1",
                   "sentiment": "negative",
                   "confidenceScores": {
                   "positive": 0.02,
                   "neutral": 0.0,
                   "negative": 0.97
                   },
                   "sentences": [
                   {
                   "sentiment": "negative",
                   "confidenceScores": {
                   "positive": 0.02,
                   "neutral": 0.0,
                   "negative": 0.97
                   },
                   "offset": 0,
                   "length": 44,
                   "text": "I love this hotel, but the service was slow."
                   }
                   ],
                   "warnings": []
                   }
                   ],
                   "errors": [],
                   "modelVersion": "2025-01-01"
                   }
                

    Score Calculation for v3 API

    Since the v3 API response format provides confidence scores instead of a single score, the normalized score is calculated using the following formula:

    score = (1 × positive) + (0.5 × neutral) + (0.01 × negative)

    This formula ensures:

    • Positive confidence pushes the score toward 1
    • Neutral confidence centers the score around 0.5
    • Negative confidence slightly pulls the score toward 0, with minimal weight (0.01) to account for negative sentiment

    Since the three confidence scores always sum to 1, this formula generates a consistent value in the range of -1 to 1, representing the full mix of sentiment information from the Azure API.