| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 3 | | // license information. |
| | 4 | |
|
| | 5 | | namespace Microsoft.Azure.Search.Models |
| | 6 | | { |
| | 7 | | using Newtonsoft.Json; |
| | 8 | | using System; |
| | 9 | | using System.Collections.Generic; |
| | 10 | |
|
| | 11 | | /// <summary> |
| | 12 | | /// Text analytics named entity recognition. This skill is deprecated in favor of <see cref="EntityRecognitionSkill" |
| | 13 | | /// <see |
| | 14 | | /// href="https://docs.microsoft.com/azure/search/cognitive-search-skill-named-entity-recognition" |
| | 15 | | /// /> |
| | 16 | | /// </summary> |
| | 17 | | [Newtonsoft.Json.JsonObject("#Microsoft.Skills.Text.NamedEntityRecognitionSkill")] |
| | 18 | | [Obsolete("Use EntityRecognitionSkill instead.")] |
| | 19 | | public partial class NamedEntityRecognitionSkill : Skill |
| | 20 | | { |
| | 21 | | /// <summary> |
| | 22 | | /// Initializes a new instance of the NamedEntityRecognitionSkill |
| | 23 | | /// class. |
| | 24 | | /// </summary> |
| 0 | 25 | | public NamedEntityRecognitionSkill() |
| | 26 | | { |
| | 27 | | CustomInit(); |
| 0 | 28 | | } |
| | 29 | |
|
| | 30 | | /// <summary> |
| | 31 | | /// Initializes a new instance of the NamedEntityRecognitionSkill |
| | 32 | | /// class. |
| | 33 | | /// </summary> |
| | 34 | | /// <param name="inputs">Inputs of the skills could be a column in the |
| | 35 | | /// source data set, or the output of an upstream skill.</param> |
| | 36 | | /// <param name="outputs">The output of a skill is either a field in a |
| | 37 | | /// search index, or a value that can be consumed as an input by |
| | 38 | | /// another skill.</param> |
| | 39 | | /// <param name="description">The description of the skill which |
| | 40 | | /// describes the inputs, outputs, and usage of the skill.</param> |
| | 41 | | /// <param name="context">Represents the level at which operations take |
| | 42 | | /// place, such as the document root or document content (for example, |
| | 43 | | /// /document or /document/content).</param> |
| | 44 | | /// <param name="categories">A list of named entity categories.</param> |
| | 45 | | /// <param name="defaultLanguageCode">A value indicating which language |
| | 46 | | /// code to use. Default is en.</param> |
| | 47 | | /// <param name="minimumPrecision">A value between 0 and 1 to indicate |
| | 48 | | /// the confidence of the results.</param> |
| | 49 | | public NamedEntityRecognitionSkill(IList<InputFieldMappingEntry> inputs, IList<OutputFieldMappingEntry> outputs, |
| 0 | 50 | | : base(inputs, outputs, description, context) |
| | 51 | | { |
| 0 | 52 | | Categories = categories; |
| 0 | 53 | | DefaultLanguageCode = defaultLanguageCode; |
| 0 | 54 | | MinimumPrecision = minimumPrecision; |
| | 55 | | CustomInit(); |
| 0 | 56 | | } |
| | 57 | |
|
| | 58 | | /// <summary> |
| | 59 | | /// An initialization method that performs custom operations like setting defaults |
| | 60 | | /// </summary> |
| | 61 | | partial void CustomInit(); |
| | 62 | |
|
| | 63 | | /// <summary> |
| | 64 | | /// Gets or sets a list of named entity categories. |
| | 65 | | /// </summary> |
| | 66 | | [JsonProperty(PropertyName = "categories")] |
| 0 | 67 | | public IList<NamedEntityCategory> Categories { get; set; } |
| | 68 | |
|
| | 69 | | /// <summary> |
| | 70 | | /// Gets or sets a value indicating which language code to use. Default |
| | 71 | | /// is en. |
| | 72 | | /// </summary> |
| | 73 | | [JsonProperty(PropertyName = "defaultLanguageCode")] |
| 0 | 74 | | public NamedEntityRecognitionSkillLanguage DefaultLanguageCode { get; set; } |
| | 75 | |
|
| | 76 | | /// <summary> |
| | 77 | | /// Gets or sets a value between 0 and 1 to indicate the confidence of |
| | 78 | | /// the results. |
| | 79 | | /// </summary> |
| | 80 | | [JsonProperty(PropertyName = "minimumPrecision")] |
| 0 | 81 | | public double? MinimumPrecision { get; set; } |
| | 82 | | } |
| | 83 | | } |