| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | // <auto-generated/> |
| | 5 | |
|
| | 6 | | #nullable disable |
| | 7 | |
|
| | 8 | | using System; |
| | 9 | | using System.Collections.Generic; |
| | 10 | | using Azure.Core; |
| | 11 | |
|
| | 12 | | namespace Azure.AI.TextAnalytics.Models |
| | 13 | | { |
| | 14 | | /// <summary> The SentenceSentiment. </summary> |
| | 15 | | internal partial class SentenceSentiment |
| | 16 | | { |
| | 17 | | /// <summary> Initializes a new instance of SentenceSentiment. </summary> |
| | 18 | | /// <param name="text"> The sentence text. </param> |
| | 19 | | /// <param name="sentiment"> The predicted Sentiment for the sentence. </param> |
| | 20 | | /// <param name="confidenceScores"> The sentiment confidence score between 0 and 1 for the sentence for all clas |
| | 21 | | /// <param name="offset"> The sentence offset from the start of the document. </param> |
| | 22 | | /// <param name="length"> The length of the sentence. </param> |
| | 23 | | /// <exception cref="ArgumentNullException"> <paramref name="text"/> or <paramref name="confidenceScores"/> is n |
| 0 | 24 | | internal SentenceSentiment(string text, SentenceSentimentValue sentiment, SentimentConfidenceScorePerLabel confi |
| | 25 | | { |
| 0 | 26 | | if (text == null) |
| | 27 | | { |
| 0 | 28 | | throw new ArgumentNullException(nameof(text)); |
| | 29 | | } |
| 0 | 30 | | if (confidenceScores == null) |
| | 31 | | { |
| 0 | 32 | | throw new ArgumentNullException(nameof(confidenceScores)); |
| | 33 | | } |
| | 34 | |
|
| 0 | 35 | | Text = text; |
| 0 | 36 | | Sentiment = sentiment; |
| 0 | 37 | | ConfidenceScores = confidenceScores; |
| 0 | 38 | | Offset = offset; |
| 0 | 39 | | Length = length; |
| 0 | 40 | | Aspects = new ChangeTrackingList<SentenceAspect>(); |
| 0 | 41 | | Opinions = new ChangeTrackingList<SentenceOpinion>(); |
| 0 | 42 | | } |
| | 43 | |
|
| | 44 | | /// <summary> Initializes a new instance of SentenceSentiment. </summary> |
| | 45 | | /// <param name="text"> The sentence text. </param> |
| | 46 | | /// <param name="sentiment"> The predicted Sentiment for the sentence. </param> |
| | 47 | | /// <param name="confidenceScores"> The sentiment confidence score between 0 and 1 for the sentence for all clas |
| | 48 | | /// <param name="offset"> The sentence offset from the start of the document. </param> |
| | 49 | | /// <param name="length"> The length of the sentence. </param> |
| | 50 | | /// <param name="aspects"> The array of aspect object for the sentence. </param> |
| | 51 | | /// <param name="opinions"> The array of opinion object for the sentence. </param> |
| 0 | 52 | | internal SentenceSentiment(string text, SentenceSentimentValue sentiment, SentimentConfidenceScorePerLabel confi |
| | 53 | | { |
| 0 | 54 | | Text = text; |
| 0 | 55 | | Sentiment = sentiment; |
| 0 | 56 | | ConfidenceScores = confidenceScores; |
| 0 | 57 | | Offset = offset; |
| 0 | 58 | | Length = length; |
| 0 | 59 | | Aspects = aspects; |
| 0 | 60 | | Opinions = opinions; |
| 0 | 61 | | } |
| | 62 | |
|
| | 63 | | /// <summary> The sentence text. </summary> |
| 0 | 64 | | public string Text { get; } |
| | 65 | | /// <summary> The predicted Sentiment for the sentence. </summary> |
| 0 | 66 | | public SentenceSentimentValue Sentiment { get; } |
| | 67 | | /// <summary> The sentiment confidence score between 0 and 1 for the sentence for all classes. </summary> |
| 0 | 68 | | public SentimentConfidenceScorePerLabel ConfidenceScores { get; } |
| | 69 | | /// <summary> The sentence offset from the start of the document. </summary> |
| 0 | 70 | | public int Offset { get; } |
| | 71 | | /// <summary> The length of the sentence. </summary> |
| 0 | 72 | | public int Length { get; } |
| | 73 | | /// <summary> The array of aspect object for the sentence. </summary> |
| 0 | 74 | | public IReadOnlyList<SentenceAspect> Aspects { get; } |
| | 75 | | /// <summary> The array of opinion object for the sentence. </summary> |
| 0 | 76 | | public IReadOnlyList<SentenceOpinion> Opinions { get; } |
| | 77 | | } |
| | 78 | | } |