| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | using System; |
| | 5 | | using System.Collections.Generic; |
| | 6 | |
|
| | 7 | | namespace Azure.AI.TextAnalytics |
| | 8 | | { |
| | 9 | | /// <summary> |
| | 10 | | /// A word or phrase identified as a known entity in a data source. |
| | 11 | | /// A link to the entry in the data source is provided as well as the formal |
| | 12 | | /// name of the entity used in the data source. Note that the formal name |
| | 13 | | /// may be different from the exact text match in the input document. |
| | 14 | | /// </summary> |
| | 15 | | public readonly struct LinkedEntity |
| | 16 | | { |
| | 17 | | internal LinkedEntity(string name, string dataSourceEntityId, string language, string dataSource, Uri url, IEnum |
| | 18 | | { |
| 124 | 19 | | Name = name; |
| 124 | 20 | | DataSourceEntityId = dataSourceEntityId; |
| 124 | 21 | | Language = language; |
| 124 | 22 | | DataSource = dataSource; |
| 124 | 23 | | Url = url; |
| 124 | 24 | | Matches = matches; |
| 124 | 25 | | } |
| | 26 | |
|
| | 27 | | /// <summary> |
| | 28 | | /// Gets the formal name of the entity. |
| | 29 | | /// </summary> |
| 12 | 30 | | public string Name { get; } |
| | 31 | |
|
| | 32 | | /// <summary> |
| | 33 | | /// Gets the unique identifier of the entity in the data source. |
| | 34 | | /// </summary> |
| 12 | 35 | | public string DataSourceEntityId { get; } |
| | 36 | |
|
| | 37 | | /// <summary> |
| | 38 | | /// Gets the language used in the data source. |
| | 39 | | /// </summary> |
| 12 | 40 | | public string Language { get; } |
| | 41 | |
|
| | 42 | | /// <summary> |
| | 43 | | /// Gets the name of the data source used to extract the entity linking. |
| | 44 | | /// </summary> |
| 12 | 45 | | public string DataSource { get; } |
| | 46 | |
|
| | 47 | | /// <summary> |
| | 48 | | /// Gets the URL that identifies the linked entity's entry in the data source. |
| | 49 | | /// </summary> |
| 12 | 50 | | public Uri Url { get; } |
| | 51 | |
|
| | 52 | | /// <summary> |
| | 53 | | /// Collection identifying the substrings of the document that correspond |
| | 54 | | /// to this linked entity. |
| | 55 | | /// </summary> |
| 36 | 56 | | public IEnumerable<LinkedEntityMatch> Matches { get; } |
| | 57 | | } |
| | 58 | | } |