| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | namespace 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 | | { |
| 80 | 15 | | Sentiment = sentiment; |
| 80 | 16 | | Text = text; |
| 80 | 17 | | ConfidenceScores = new SentimentConfidenceScores(positiveScore, neutralScore, negativeScore); |
| 80 | 18 | | } |
| | 19 | |
|
| | 20 | | /// <summary> |
| | 21 | | /// Gets the predicted sentiment for the analyzed sentence. |
| | 22 | | /// </summary> |
| 4 | 23 | | public TextSentiment Sentiment { get; } |
| | 24 | |
|
| | 25 | | /// <summary> |
| | 26 | | /// Gets the sentence text. |
| | 27 | | /// </summary> |
| 72 | 28 | | 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> |
| 288 | 34 | | public SentimentConfidenceScores ConfidenceScores { get; } |
| | 35 | | } |
| | 36 | | } |