Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion sdk/textanalytics/Azure.AI.TextAnalytics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Release History

## 1.0.0-preview.3 (Unreleased)

- Renamed type `SentimentScorePerLabel` to `SentimentConfidenceScorePerLabel`.
- In both `DocumentSentiment` and `SentenceSentiment` property `SentimentScores` has been renamed to `ConfidenceScores`.
- In `LinkedEntity`, property `Id` has been renamed to `DataSourceEntityId`.
- Added `DetectLanguageInput.None` for user convenience, instead of passing empty string to `CountryHint`.

## 1.0.0-preview.2 (2020-02-11)
### Breaking changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var inputs = new List<DetectLanguageInput>
},
new DetectLanguageInput("4", ":) :( :D")
{
CountryHint = "us",
CountryHint = DetectLanguageInput.None,
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ namespace Azure.AI.TextAnalytics
/// </summary>
public class DetectLanguageInput
{
/// <summary>
/// A wildcard that allows to set CountryHint to None
/// so the servide model doesn't use any default CountryHint.
/// </summary>
public const string None = "";

/// <summary>
/// Initializes a new instance of the <see cref="DetectLanguageInput"/>
/// class.
Expand All @@ -34,9 +40,8 @@ public DetectLanguageInput(string id, string text)
/// Gets or sets a hint to assist the text analytics model in predicting
/// the language the document is written in. If unspecified, this value
/// will be set to the default country hint in <see cref="TextAnalyticsClientOptions"/>
/// in the request sent to the service. If set to an empty string, the
/// service will apply a model where the country is explicitly set to
/// "None".
/// in the request sent to the service.
/// To remove this behavior, set to <see cref="None"/>.
/// </summary>
public string CountryHint { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,8 @@ public TextAnalyticsClient(Uri endpoint, TextAnalyticsApiKeyCredential credentia
/// input to assist the text analytics model in predicting the language
/// it is written in. If unspecified, this value will be set to the
/// default country hint in <see cref="TextAnalyticsClientOptions"/>
/// in the request sent to the service. If set to an empty string, the
/// service will apply a model where the country is explicitly set to
/// "None".</param>
/// in the request sent to the service.
/// To remove this behavior, set to <see cref="DetectLanguageInput.None"/>.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/>
/// controlling the request lifetime.</param>
/// <returns>A result containing the detected language or an error if
Expand Down Expand Up @@ -180,9 +179,8 @@ public virtual async Task<Response<DetectedLanguage>> DetectLanguageAsync(string
/// input to assist the text analytics model in predicting the language
/// it is written in. If unspecified, this value will be set to the
/// default country hint in <see cref="TextAnalyticsClientOptions"/>
/// in the request sent to the service. If set to an empty string, the
/// service will apply a model where the country is explicitly set to
/// "None".</param>
/// in the request sent to the service.
/// To remove this behavior, set to <see cref="DetectLanguageInput.None"/>.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/>
/// controlling the request lifetime.</param>
/// <returns>A result containing the detected language or an error if
Expand Down Expand Up @@ -240,10 +238,8 @@ public virtual Response<DetectedLanguage> DetectLanguage(string inputText, strin
/// the input strings to assist the text analytics model in predicting
/// the language they is written in. If unspecified, this value will be
/// set to the default country hint in <see cref="TextAnalyticsClientOptions"/>
/// in the request sent to the service. If set to an empty string, the
/// service will apply a model where the country is explicitly set to
/// "None". The same country hint is applied to all strings in the
/// input collection.</param>
/// in the request sent to the service.
/// To remove this behavior, set to <see cref="DetectLanguageInput.None"/>.</param>
/// <param name="options"><see cref="TextAnalyticsRequestOptions"/> used to
/// select the version of the predictive model to run, and whether
/// statistics are returned in the response.</param>
Expand Down Expand Up @@ -276,10 +272,8 @@ public virtual async Task<Response<DetectLanguageResultCollection>> DetectLangua
/// the input strings to assist the text analytics model in predicting
/// the language they is written in. If unspecified, this value will be
/// set to the default country hint in <see cref="TextAnalyticsClientOptions"/>
/// in the request sent to the service. If set to an empty string, the
/// service will apply a model where the country is explicitly set to
/// "None". The same country hint is applied to all strings in the
/// input collection.</param>
/// in the request sent to the service.
/// To remove this behavior, set to <see cref="DetectLanguageInput.None"/>.</param>
/// <param name="options"><see cref="TextAnalyticsRequestOptions"/> used to
/// select the version of the predictive model to run, and whether
/// statistics are returned in the response.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,15 @@ public enum ServiceVersion
internal ServiceVersion Version { get; }

/// <summary>
/// Default country hint value to use in all client calls.
/// If no value is specified, "us" is set as default.
/// To remove this behavior, set to <see cref="DetectLanguageInput.None"/>.
/// </summary>
public string DefaultCountryHint { get; set; } = "us";

/// <summary>
/// Default language value to use in all client calls.
/// If no value is specified, "en" is set as default.
/// </summary>
public string DefaultLanguage { get; set; } = "en";

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading