| | | 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 | | |
| | | 10 | | namespace Azure.AI.TextAnalytics.Models |
| | | 11 | | { |
| | | 12 | | /// <summary> The Entity. </summary> |
| | | 13 | | internal partial class Entity |
| | | 14 | | { |
| | | 15 | | /// <summary> Initializes a new instance of Entity. </summary> |
| | | 16 | | /// <param name="text"> Entity text as appears in the request. </param> |
| | | 17 | | /// <param name="category"> Entity type, such as Person/Location/Org/SSN etc. </param> |
| | | 18 | | /// <param name="offset"> Start position for the entity text. </param> |
| | | 19 | | /// <param name="length"> Length for the entity text. </param> |
| | | 20 | | /// <param name="confidenceScore"> Confidence score between 0 and 1 of the extracted entity. </param> |
| | | 21 | | /// <exception cref="ArgumentNullException"> <paramref name="text"/> or <paramref name="category"/> is null. </e |
| | 0 | 22 | | internal Entity(string text, string category, int offset, int length, double confidenceScore) |
| | | 23 | | { |
| | 0 | 24 | | if (text == null) |
| | | 25 | | { |
| | 0 | 26 | | throw new ArgumentNullException(nameof(text)); |
| | | 27 | | } |
| | 0 | 28 | | if (category == null) |
| | | 29 | | { |
| | 0 | 30 | | throw new ArgumentNullException(nameof(category)); |
| | | 31 | | } |
| | | 32 | | |
| | 0 | 33 | | Text = text; |
| | 0 | 34 | | Category = category; |
| | 0 | 35 | | Offset = offset; |
| | 0 | 36 | | Length = length; |
| | 0 | 37 | | ConfidenceScore = confidenceScore; |
| | 0 | 38 | | } |
| | | 39 | | |
| | | 40 | | /// <summary> Initializes a new instance of Entity. </summary> |
| | | 41 | | /// <param name="text"> Entity text as appears in the request. </param> |
| | | 42 | | /// <param name="category"> Entity type, such as Person/Location/Org/SSN etc. </param> |
| | | 43 | | /// <param name="subcategory"> Entity sub type, such as Age/Year/TimeRange etc. </param> |
| | | 44 | | /// <param name="offset"> Start position for the entity text. </param> |
| | | 45 | | /// <param name="length"> Length for the entity text. </param> |
| | | 46 | | /// <param name="confidenceScore"> Confidence score between 0 and 1 of the extracted entity. </param> |
| | 0 | 47 | | internal Entity(string text, string category, string subcategory, int offset, int length, double confidenceScore |
| | | 48 | | { |
| | 0 | 49 | | Text = text; |
| | 0 | 50 | | Category = category; |
| | 0 | 51 | | Subcategory = subcategory; |
| | 0 | 52 | | Offset = offset; |
| | 0 | 53 | | Length = length; |
| | 0 | 54 | | ConfidenceScore = confidenceScore; |
| | 0 | 55 | | } |
| | | 56 | | |
| | | 57 | | /// <summary> Entity text as appears in the request. </summary> |
| | 0 | 58 | | public string Text { get; } |
| | | 59 | | /// <summary> Entity type, such as Person/Location/Org/SSN etc. </summary> |
| | 0 | 60 | | public string Category { get; } |
| | | 61 | | /// <summary> Entity sub type, such as Age/Year/TimeRange etc. </summary> |
| | 0 | 62 | | public string Subcategory { get; } |
| | | 63 | | /// <summary> Start position for the entity text. </summary> |
| | 0 | 64 | | public int Offset { get; } |
| | | 65 | | /// <summary> Length for the entity text. </summary> |
| | 0 | 66 | | public int Length { get; } |
| | | 67 | | /// <summary> Confidence score between 0 and 1 of the extracted entity. </summary> |
| | 0 | 68 | | public double ConfidenceScore { get; } |
| | | 69 | | } |
| | | 70 | | } |