| | | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 2 | | // Licensed under the MIT License. |
| | | 3 | | |
| | | 4 | | namespace Azure.AI.TextAnalytics |
| | | 5 | | { |
| | | 6 | | /// <summary> |
| | | 7 | | /// An input to the detect language operation. This object allows the |
| | | 8 | | /// caller to specify a unique document id, as well as the full text of a |
| | | 9 | | /// document and a hint indicating the document's country of origin to assist |
| | | 10 | | /// the Text Analytics predictive model in detecting the document's language. |
| | | 11 | | /// </summary> |
| | | 12 | | public class DetectLanguageInput : TextAnalyticsInput |
| | | 13 | | { |
| | | 14 | | /// <summary> |
| | | 15 | | /// A wildcard that allows to set CountryHint to None |
| | | 16 | | /// so the servide model doesn't use any default CountryHint. |
| | | 17 | | /// </summary> |
| | | 18 | | public const string None = ""; |
| | | 19 | | |
| | | 20 | | /// <summary> |
| | | 21 | | /// Initializes a new instance of the <see cref="DetectLanguageInput"/> |
| | | 22 | | /// class. |
| | | 23 | | /// </summary> |
| | | 24 | | /// <param name="id">The id of the document represented by this instance. |
| | | 25 | | /// The id must be unique within the batch of documents analyzed in a |
| | | 26 | | /// given detect language operation.</param> |
| | | 27 | | /// <param name="text">The text of the document.</param> |
| | 64 | 28 | | public DetectLanguageInput(string id, string text) : base(id, text) { } |
| | | 29 | | |
| | | 30 | | /// <summary> |
| | | 31 | | /// Gets or sets a hint to assist the Text Analytics model in predicting |
| | | 32 | | /// the language the document is written in. If unspecified, this value |
| | | 33 | | /// will be set to the default country hint in <see cref="TextAnalyticsClientOptions"/> |
| | | 34 | | /// in the request sent to the service. |
| | | 35 | | /// To remove this behavior, set to <see cref="None"/>. |
| | | 36 | | /// </summary> |
| | 64 | 37 | | public string CountryHint { get; set; } |
| | | 38 | | } |
| | | 39 | | } |