< Summary

Class:Azure.AI.TextAnalytics.SentenceSentiment
Assembly:Azure.AI.TextAnalytics
File(s):C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\SentenceSentiment.cs
Covered lines:7
Uncovered lines:0
Coverable lines:7
Total lines:36
Line coverage:100% (7 of 7)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%100%
get_Sentiment()-100%100%
get_Text()-100%100%
get_ConfidenceScores()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\SentenceSentiment.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4namespace Azure.AI.TextAnalytics
 5{
 6    /// <summary>
 7    /// The predicted sentiment for a given span of text.
 8    /// For more information regarding text sentiment, see
 9    /// <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/Text-Analytics/how-tos/text-analytics-how-to-
 10    /// </summary>
 11    public readonly struct SentenceSentiment
 12    {
 13        internal SentenceSentiment(TextSentiment sentiment, string text, double positiveScore, double neutralScore, doub
 14        {
 8015            Sentiment = sentiment;
 8016            Text = text;
 8017            ConfidenceScores = new SentimentConfidenceScores(positiveScore, neutralScore, negativeScore);
 8018        }
 19
 20        /// <summary>
 21        /// Gets the predicted sentiment for the analyzed sentence.
 22        /// </summary>
 423        public TextSentiment Sentiment { get; }
 24
 25        /// <summary>
 26        /// Gets the sentence text.
 27        /// </summary>
 7228        public string Text { get; }
 29
 30        /// <summary>
 31        /// Gets the sentiment confidence score (Softmax score) between 0 and 1,
 32        /// for each sentiment. Higher values signify higher confidence.
 33        /// </summary>
 28834        public SentimentConfidenceScores ConfidenceScores { get; }
 35    }
 36}