Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TA] Improve Actions docs and throw when more than one action type #22333

Merged
merged 1 commit into from
Jun 30, 2021
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
6 changes: 4 additions & 2 deletions sdk/textanalytics/Azure.AI.TextAnalytics/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
## 5.1.0-beta.8 (Unreleased)
### New features
- Added support for service version `3.0`. This can be specified in the `TextAnalyticsClientOptions` object under the `ServiceVersion` enum. By default the SDK targets latest supported service version.
- Added AAD support for the `StartAnalyzeHealthcareEntities` methods.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to add in previous PR

- Added value `None` to enum `PiiEntityDomainType` to allow user to specify no domain.
- Added new overload methods to all `xxActions` types that take a `xxOptions` object to facilitate a transition from a singular method to an actions method.
- The parameter `CategoriesFilter` in `RecognizePiiEntitiesActions` has been enabled for `StartAnalyzeActions` methods.

### Breaking changes
- Changed behavior in `StartAnalyzeActions` and `StartAnalyzeActionsAsync` where now accepts a single action per action type. An `ArgumentException` is raised if duplicate actions are passed.
- Changed type `RecognizePiiEntitiesOptions.DomainFilter` from `PiiEntityDomainType?` to `PiiEntityDomainType`.
- Changed type `AnalyzeActionsOptions.IncludeStatistics` from `bool` to `bool?`.
- Renamed `StartAnalyzeBatchActions` to `StartAnalyzeActions`.
- Renamed `AnalyzeBatchActionsOperation` to `AnalyzeActionsOperation`.
- Renamed `AnalyzeBatchActionsResult` to `AnalyzeActionsResult`.
Expand All @@ -22,8 +26,6 @@
- Renamed type `PiiEntityDomainType` to `PiiEntityDomain`.
- Renamed type `Results` to `DocumentsResults` in `AnalyzeSentimentActionResult`, `ExtractKeyPhrasesActionResult`, `RecognizeEntitiesActionResult`, `RecognizeLinkedEntitiesActionResult`, and `RecognizePiiEntitiesActionResult`.
- Renamed all types under `AnalyzeActionsResult` from `xxActionsResults` to ``xxResults`.
- Changed type `RecognizePiiEntitiesOptions.DomainFilter` from `PiiEntityDomainType?` to `PiiEntityDomainType`.
- Changed type `AnalyzeActionsOptions.IncludeStatistics` from `bool` to `bool?`.
- Removed property `Statistics` from `AnalyzeActionsResult` as it is not currently returned by the service even if the user passes `IncludeStatistics = true`.
- Removed property `StringIndexType` from `TextAnalyticsRequestOptions`. This SDK will keep using `UTF-16` code unit as the default encoding.
- Removed type `ExtractKeyPhrasesOptions` and respective exposure.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ public AnalyzeSentimentAction(AnalyzeSentimentOptions options)
/// The default value of this property is 'false'. This means, Text Analytics service logs your input text for 48 hours,
/// solely to allow for troubleshooting issues.
/// Setting this property to true, disables input logging and may limit our ability to investigate issues that occur.
/// <para>
/// Please see Cognitive Services Compliance and Privacy notes at <see href="https://aka.ms/cs-compliance"/> for additional details,
/// and Microsoft Responsible AI principles at <see href="https://www.microsoft.com/en-us/ai/responsible-ai"/>.
/// </para>
/// </summary>
/// <remarks>
/// This property only applies for <see cref="TextAnalyticsClientOptions.ServiceVersion.V3_1"/> and up.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ public ExtractKeyPhrasesAction(TextAnalyticsRequestOptions options)
/// The default value of this property is 'false'. This means, Text Analytics service logs your input text for 48 hours,
/// solely to allow for troubleshooting issues.
/// Setting this property to true, disables input logging and may limit our ability to investigate issues that occur.
/// <para>
/// Please see Cognitive Services Compliance and Privacy notes at <see href="https://aka.ms/cs-compliance"/> for additional details,
/// and Microsoft Responsible AI principles at <see href="https://www.microsoft.com/en-us/ai/responsible-ai"/>.
/// </para>
/// </summary>
/// <remarks>
/// This property only applies for <see cref="TextAnalyticsClientOptions.ServiceVersion.V3_1"/> and up.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ public RecognizeEntitiesAction(TextAnalyticsRequestOptions options)
/// The default value of this property is 'false'. This means, Text Analytics service logs your input text for 48 hours,
/// solely to allow for troubleshooting issues.
/// Setting this property to true, disables input logging and may limit our ability to investigate issues that occur.
/// <para>
/// Please see Cognitive Services Compliance and Privacy notes at <see href="https://aka.ms/cs-compliance"/> for additional details,
/// and Microsoft Responsible AI principles at <see href="https://www.microsoft.com/en-us/ai/responsible-ai"/>.
/// </para>
/// </summary>
/// <remarks>
/// This property only applies for <see cref="TextAnalyticsClientOptions.ServiceVersion.V3_1"/> and up.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ public RecognizeLinkedEntitiesAction(TextAnalyticsRequestOptions options)
/// The default value of this property is 'false'. This means, Text Analytics service logs your input text for 48 hours,
/// solely to allow for troubleshooting issues.
/// Setting this property to true, disables input logging and may limit our ability to investigate issues that occur.
/// <para>
/// Please see Cognitive Services Compliance and Privacy notes at <see href="https://aka.ms/cs-compliance"/> for additional details,
/// and Microsoft Responsible AI principles at <see href="https://www.microsoft.com/en-us/ai/responsible-ai"/>.
/// </para>
/// </summary>
/// <remarks>
/// This property only applies for <see cref="TextAnalyticsClientOptions.ServiceVersion.V3_1"/> and up.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ public RecognizePiiEntitiesAction(RecognizePiiEntitiesOptions options)
/// <summary>
/// The default value of this property is 'true'. This means, Text Analytics service won't log your input text.
/// Setting this property to 'false', enables logging your input text for 48 hours, solely to allow for troubleshooting issues.
/// <para>
/// Please see Cognitive Services Compliance and Privacy notes at <see href="https://aka.ms/cs-compliance"/> for additional details,
/// and Microsoft Responsible AI principles at <see href="https://www.microsoft.com/en-us/ai/responsible-ai"/>.
/// </para>
/// </summary>
/// <remarks>
/// This property only applies for <see cref="TextAnalyticsClientOptions.ServiceVersion.V3_1"/> and up.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,31 @@ public TextAnalyticsActions()

/// <summary>
/// The set of <see cref="ExtractKeyPhrasesAction"/> that will get executed on the input documents.
/// Note that currently only one <see cref="ExtractKeyPhrasesAction"/> is supported.
/// </summary>
public IReadOnlyCollection<ExtractKeyPhrasesAction> ExtractKeyPhrasesActions { get; set; }

/// <summary>
/// The set of <see cref="RecognizeEntitiesAction"/> that will get executed on the input documents.
/// Note that currently only one <see cref="RecognizeEntitiesAction"/> is supported.
/// </summary>
public IReadOnlyCollection<RecognizeEntitiesAction> RecognizeEntitiesActions { get; set; }

/// <summary>
/// The set of <see cref="RecognizePiiEntitiesAction"/> that will get executed on the input documents.
/// Note that currently only one <see cref="RecognizePiiEntitiesAction"/> is supported.
/// </summary>
public IReadOnlyCollection<RecognizePiiEntitiesAction> RecognizePiiEntitiesActions { get; set; }

/// <summary>
/// The set of <see cref="RecognizeLinkedEntitiesAction"/> that will get executed on the input documents.
/// Note that currently only one <see cref="RecognizeLinkedEntitiesAction"/> is supported.
/// </summary>
public IReadOnlyCollection<RecognizeLinkedEntitiesAction> RecognizeLinkedEntitiesActions { get; set; }

/// <summary>
/// The set of <see cref="AnalyzeSentimentAction"/> that will get executed on the input documents.
/// Note that currently only one <see cref="AnalyzeSentimentAction"/> is supported.
/// </summary>
public IReadOnlyCollection<AnalyzeSentimentAction> AnalyzeSentimentActions { get; set; }
}
Expand Down
Loading