diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/CHANGELOG.md b/sdk/textanalytics/Azure.AI.TextAnalytics/CHANGELOG.md index c35677367a3d0..ae92894d4cee5 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/CHANGELOG.md +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/CHANGELOG.md @@ -6,6 +6,12 @@ - Renamed `AnalyzeBatchActionsOperation` to `AnalyzeActionsOperation`. - Renamed `AnalyzeBatchActionsResult` to `AnalyzeActionsResult`. - Renamed `AnalyzeBatchActionsOptions` to `AnalyzeActionsOptions`. +- `TextAnalyticsActions` now takes `xxAction` types, instead of `xxOptions` types. Renames and types are as follow: + - `ExtractKeyPhrasesOptions` changed to new type `ExtractKeyPhrasesActions`. + - `RecognizeEntitiesOptions` changed to new type `RecognizeEntitiesActions`. + - `RecognizePiiEntitiesOptions` changed to new type `RecognizePiiEntitiesActions`. + - `RecognizeLinkedEntitiesOptions` changed to new type `RecognizeLinkedEntitiesActions`. + - `AnalyzeSentimentOptions` changed to new type `AnalyzeSentimentActions`. ## 5.1.0-beta.7 (2021-05-18) ### New features diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/README.md b/sdk/textanalytics/Azure.AI.TextAnalytics/README.md index 809512699fa76..1dc5a53176dd3 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/README.md +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/README.md @@ -558,11 +558,11 @@ This functionality allows running multiple actions in one or more documents. Act TextAnalyticsActions actions = new TextAnalyticsActions() { - ExtractKeyPhrasesOptions = new List() { new ExtractKeyPhrasesOptions() }, - RecognizeEntitiesOptions = new List() { new RecognizeEntitiesOptions() }, - RecognizePiiEntitiesOptions = new List() { new RecognizePiiEntitiesOptions() }, - RecognizeLinkedEntitiesOptions = new List() { new RecognizeLinkedEntitiesOptions() }, - AnalyzeSentimentOptions = new List() { new AnalyzeSentimentOptions() }, + ExtractKeyPhrasesActions = new List() { new ExtractKeyPhrasesAction() }, + RecognizeEntitiesActions = new List() { new RecognizeEntitiesAction() }, + RecognizePiiEntitiesActions = new List() { new RecognizePiiEntitiesAction() }, + RecognizeLinkedEntitiesActions = new List() { new RecognizeLinkedEntitiesAction() }, + AnalyzeSentimentActions = new List() { new AnalyzeSentimentAction() }, DisplayName = "AnalyzeOperationSample" }; diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/api/Azure.AI.TextAnalytics.netstandard2.0.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/api/Azure.AI.TextAnalytics.netstandard2.0.cs index 9bf8f6c414afa..1270ec76c3cfa 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/api/Azure.AI.TextAnalytics.netstandard2.0.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/api/Azure.AI.TextAnalytics.netstandard2.0.cs @@ -79,6 +79,10 @@ internal AnalyzeHealthcareEntitiesResultCollection() : base (default(System.Coll public string ModelVersion { get { throw null; } } public Azure.AI.TextAnalytics.TextDocumentBatchStatistics Statistics { get { throw null; } } } + public partial class AnalyzeSentimentAction : Azure.AI.TextAnalytics.AnalyzeSentimentOptions + { + public AnalyzeSentimentAction() { } + } public partial class AnalyzeSentimentActionResult : Azure.AI.TextAnalytics.TextAnalyticsActionDetails { internal AnalyzeSentimentActionResult() { } @@ -218,6 +222,10 @@ internal EntityDataSource() { } public string EntityId { get { throw null; } } public string Name { get { throw null; } } } + public partial class ExtractKeyPhrasesAction : Azure.AI.TextAnalytics.ExtractKeyPhrasesOptions + { + public ExtractKeyPhrasesAction() { } + } public partial class ExtractKeyPhrasesActionResult : Azure.AI.TextAnalytics.TextAnalyticsActionDetails { internal ExtractKeyPhrasesActionResult() { } @@ -558,6 +566,10 @@ public enum PiiEntityDomainType { ProtectedHealthInformation = 0, } + public partial class RecognizeEntitiesAction : Azure.AI.TextAnalytics.RecognizeEntitiesOptions + { + public RecognizeEntitiesAction() { } + } public partial class RecognizeEntitiesActionResult : Azure.AI.TextAnalytics.TextAnalyticsActionDetails { internal RecognizeEntitiesActionResult() { } @@ -578,6 +590,10 @@ internal RecognizeEntitiesResultCollection() : base (default(System.Collections. public string ModelVersion { get { throw null; } } public Azure.AI.TextAnalytics.TextDocumentBatchStatistics Statistics { get { throw null; } } } + public partial class RecognizeLinkedEntitiesAction : Azure.AI.TextAnalytics.RecognizeLinkedEntitiesOptions + { + public RecognizeLinkedEntitiesAction() { } + } public partial class RecognizeLinkedEntitiesActionResult : Azure.AI.TextAnalytics.TextAnalyticsActionDetails { internal RecognizeLinkedEntitiesActionResult() { } @@ -598,6 +614,10 @@ internal RecognizeLinkedEntitiesResultCollection() : base (default(System.Collec public string ModelVersion { get { throw null; } } public Azure.AI.TextAnalytics.TextDocumentBatchStatistics Statistics { get { throw null; } } } + public partial class RecognizePiiEntitiesAction : Azure.AI.TextAnalytics.RecognizePiiEntitiesOptions + { + public RecognizePiiEntitiesAction() { } + } public partial class RecognizePiiEntitiesActionResult : Azure.AI.TextAnalytics.TextAnalyticsActionDetails { internal RecognizePiiEntitiesActionResult() { } @@ -687,12 +707,12 @@ internal TextAnalyticsActionDetails() { } public partial class TextAnalyticsActions { public TextAnalyticsActions() { } - public System.Collections.Generic.IReadOnlyCollection AnalyzeSentimentOptions { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyCollection AnalyzeSentimentActions { get { throw null; } set { } } public string DisplayName { get { throw null; } set { } } - public System.Collections.Generic.IReadOnlyCollection ExtractKeyPhrasesOptions { get { throw null; } set { } } - public System.Collections.Generic.IReadOnlyCollection RecognizeEntitiesOptions { get { throw null; } set { } } - public System.Collections.Generic.IReadOnlyCollection RecognizeLinkedEntitiesOptions { get { throw null; } set { } } - public System.Collections.Generic.IReadOnlyCollection RecognizePiiEntitiesOptions { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyCollection ExtractKeyPhrasesActions { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyCollection RecognizeEntitiesActions { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyCollection RecognizeLinkedEntitiesActions { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyCollection RecognizePiiEntitiesActions { get { throw null; } set { } } } public partial class TextAnalyticsClient { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample_AnalyzeActions.md b/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample_AnalyzeActions.md index 191e2b92cea3c..b42349b653d56 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample_AnalyzeActions.md +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample_AnalyzeActions.md @@ -35,11 +35,11 @@ To run multiple actions in multiple documents, call `StartAnalyzeActionsAsync` o TextAnalyticsActions actions = new TextAnalyticsActions() { - ExtractKeyPhrasesOptions = new List() { new ExtractKeyPhrasesOptions() }, - RecognizeEntitiesOptions = new List() { new RecognizeEntitiesOptions() }, - RecognizePiiEntitiesOptions = new List() { new RecognizePiiEntitiesOptions() }, - RecognizeLinkedEntitiesOptions = new List() { new RecognizeLinkedEntitiesOptions() }, - AnalyzeSentimentOptions = new List() { new AnalyzeSentimentOptions() }, + ExtractKeyPhrasesActions = new List() { new ExtractKeyPhrasesAction() }, + RecognizeEntitiesActions = new List() { new RecognizeEntitiesAction() }, + RecognizePiiEntitiesActions = new List() { new RecognizePiiEntitiesAction() }, + RecognizeLinkedEntitiesActions = new List() { new RecognizeLinkedEntitiesAction() }, + AnalyzeSentimentActions = new List() { new AnalyzeSentimentAction() }, DisplayName = "AnalyzeOperationSample" }; diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeActionsOptions.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeActionsOptions.cs index 694fa261b5991..df03028da7f6f 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeActionsOptions.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeActionsOptions.cs @@ -6,7 +6,7 @@ namespace Azure.AI.TextAnalytics /// /// Options that allow callers to specify details about how the operation /// is run and what information is returned from it by the service. - /// For example whether to include statistics. + /// For example, whether to include statistics. /// public class AnalyzeActionsOptions { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeSentimentAction.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeSentimentAction.cs new file mode 100644 index 0000000000000..33160079d8ec6 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeSentimentAction.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.AI.TextAnalytics +{ + /// + /// Configurations that allow callers to specify details about how to execute + /// an Analyze Sentiment action in a set of documents. + /// For example, execute opinion mining, set model version, and more. + /// + public class AnalyzeSentimentAction : AnalyzeSentimentOptions + { + /// + /// Initializes a new instance of the + /// class which allows callers to specify details about how to execute + /// an Analyze Sentiment action in a set of documents. + /// For example, execute opinion mining, set model version, and more. + /// + public AnalyzeSentimentAction() + { + } + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeSentimentOptions.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeSentimentOptions.cs index 78f9af218e861..36a1df497f589 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeSentimentOptions.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeSentimentOptions.cs @@ -5,14 +5,16 @@ namespace Azure.AI.TextAnalytics { /// /// Options that allow callers to specify details about how the operation - /// is run. For example execute opinion mining, set model version, and whether to include statistics. + /// is run. For example, execute opinion mining, set model version, + /// whether to include statistics, and more. /// public class AnalyzeSentimentOptions : TextAnalyticsRequestOptions { /// /// Initializes a new instance of the /// class which allows callers to specify details about how the operation - /// is run. For example execute opinion mining, set model version, and whether to include statistics. + /// is run. For example, execute opinion mining, set model version, + /// whether to include statistics, and more. /// public AnalyzeSentimentOptions() { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractKeyPhrasesAction.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractKeyPhrasesAction.cs new file mode 100644 index 0000000000000..24dbb11b98c12 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractKeyPhrasesAction.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.AI.TextAnalytics +{ + /// + /// Configurations that allow callers to specify details about how to execute + /// an Extract KeyPhrases action in a set of documents. + /// For example, set model version, disable service logging, and more. + /// + public class ExtractKeyPhrasesAction : ExtractKeyPhrasesOptions + { + /// + /// Initializes a new instance of the + /// class which allows callers to specify details about how to execute + /// an Extract KeyPhrases action in a set of documents. + /// For example, set model version, disable service logging, and more. + /// + public ExtractKeyPhrasesAction() + { + } + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractKeyPhrasesOptions.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractKeyPhrasesOptions.cs index 9d8f815595158..e1ad9d9cfc304 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractKeyPhrasesOptions.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractKeyPhrasesOptions.cs @@ -5,14 +5,14 @@ namespace Azure.AI.TextAnalytics { /// /// Options that allow callers to specify details about how the operation - /// is run. For example set model version and whether to include statistics. + /// is run. For example, set model version, whether to include statistics, and more. /// public class ExtractKeyPhrasesOptions : TextAnalyticsRequestOptions { /// /// Initializes a new instance of the /// class which allows callers to specify details about how the operation - /// is run. For example set model version, whether to include statistics. + /// is run. For example, set model version, whether to include statistics, and more. /// public ExtractKeyPhrasesOptions() { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeEntitiesAction.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeEntitiesAction.cs new file mode 100644 index 0000000000000..c080362c13af1 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeEntitiesAction.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.AI.TextAnalytics +{ + /// + /// Configurations that allow callers to specify details about how to execute + /// a Recognize Entities action in a set of documents. + /// For example, set model version, disable service logging, and more. + /// + public class RecognizeEntitiesAction : RecognizeEntitiesOptions + { + /// + /// Initializes a new instance of the + /// class which allows callers to specify details about how to execute + /// a Recognize Entities action in a set of documents. + /// For example, set model version, disable service logging, and more. + /// + public RecognizeEntitiesAction() + { + } + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeEntitiesOptions.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeEntitiesOptions.cs index ff81b913ff34e..f7c806fe70de0 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeEntitiesOptions.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeEntitiesOptions.cs @@ -5,14 +5,14 @@ namespace Azure.AI.TextAnalytics { /// /// Options that allow callers to specify details about how the operation - /// is run. For example set model version, whether to include statistics. + /// is run. For example, set model version, whether to include statistics, and more. /// public class RecognizeEntitiesOptions : TextAnalyticsRequestOptions { /// /// Initializes a new instance of the /// class which allows callers to specify details about how the operation - /// is run. For example set model version, whether to include statistics. + /// is run. For example, set model version, whether to include statistics, and more. /// public RecognizeEntitiesOptions() { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeLinkedEntitiesAction.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeLinkedEntitiesAction.cs new file mode 100644 index 0000000000000..4efe0263217ca --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeLinkedEntitiesAction.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.AI.TextAnalytics +{ + /// + /// Configurations that allow callers to specify details about how to execute + /// a Recognize Linked Entities action in a set of documents. + /// For example, set model version, disable service logging, and more. + /// + public class RecognizeLinkedEntitiesAction : RecognizeLinkedEntitiesOptions + { + /// + /// Initializes a new instance of the + /// class which allows callers to specify details about how to execute + /// a Recognize Linked Entities action in a set of documents. + /// For example, set model version, disable service logging, and more. + /// + public RecognizeLinkedEntitiesAction() + { + } + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeLinkedEntitiesOptions.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeLinkedEntitiesOptions.cs index c7e91cf112b43..0a380f05b003b 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeLinkedEntitiesOptions.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeLinkedEntitiesOptions.cs @@ -1,20 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System.Collections.Generic; - namespace Azure.AI.TextAnalytics { /// /// Options that allow callers to specify details about how the operation - /// is run. For example set model version or whether to include statistics. + /// is run. For example, set model version, whether to include statistics, and more. /// public class RecognizeLinkedEntitiesOptions : TextAnalyticsRequestOptions { /// /// Initializes a new instance of the /// class which allows callers to specify details about how the operation - /// is run. For example set model version or whether to include statistics. + /// is run. For example, set model version, whether to include statistics, and more. /// public RecognizeLinkedEntitiesOptions() { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizePiiEntitiesAction.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizePiiEntitiesAction.cs new file mode 100644 index 0000000000000..7ed98f9efc5a3 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizePiiEntitiesAction.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.AI.TextAnalytics +{ + /// + /// Configurations that allow callers to specify details about how to execute + /// a Recognize PII Entities action in a set of documents. + /// For example, set model version, filter the response entities by a given + /// domain filter, and more. + /// + public class RecognizePiiEntitiesAction : RecognizePiiEntitiesOptions + { + /// + /// Initializes a new instance of the + /// class which allows callers to specify details about how to execute + /// a Recognize PII Entities action in a set of documents. + /// For example, set model version, filter the response entities by a given + /// domain filter, and more. + /// + public RecognizePiiEntitiesAction() + { + } + } +} diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizePiiEntitiesOptions.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizePiiEntitiesOptions.cs index 20736bfad5249..1143f506632a0 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizePiiEntitiesOptions.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizePiiEntitiesOptions.cs @@ -7,16 +7,16 @@ namespace Azure.AI.TextAnalytics { /// /// Options that allow callers to specify details about how the operation - /// is run. For example set model version, whether to include statistics, - /// and filter the response entities by a given domain filter. + /// is run. For example, set model version, whether to include statistics, + /// filter the response entities by a given domain filter, and more. /// public class RecognizePiiEntitiesOptions : TextAnalyticsRequestOptions { /// /// Initializes a new instance of the /// class which allows callers to specify details about how the operation - /// is run. For example set model version, whether to include statistics, - /// and filter the response entities by a given domain filter. + /// is run. For example, set model version, whether to include statistics, + /// filter the response entities by a given domain filter, and more. /// public RecognizePiiEntitiesOptions() { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActions.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActions.cs index 49015ea8fa9fe..d98a69c110d86 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActions.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActions.cs @@ -9,33 +9,33 @@ namespace Azure.AI.TextAnalytics public class TextAnalyticsActions { /// - /// Optional display name for the analysis operation. + /// Optional display name for the operation. /// public string DisplayName { get; set; } /// - /// Extract KeyPhrases actions configurations. + /// Extract KeyPhrases actions. /// - public IReadOnlyCollection ExtractKeyPhrasesOptions { get; set; } + public IReadOnlyCollection ExtractKeyPhrasesActions { get; set; } /// - /// Recognize Entities actions configurations. + /// Recognize Entities actions. /// - public IReadOnlyCollection RecognizeEntitiesOptions { get; set; } + public IReadOnlyCollection RecognizeEntitiesActions { get; set; } /// - /// Recognize PII Entities actions configurations. + /// Recognize PII Entities actions. /// - public IReadOnlyCollection RecognizePiiEntitiesOptions { get; set; } + public IReadOnlyCollection RecognizePiiEntitiesActions { get; set; } /// - /// Recognize Linked Entities actions configurations. + /// Recognize Linked Entities actions. /// - public IReadOnlyCollection RecognizeLinkedEntitiesOptions { get; set; } + public IReadOnlyCollection RecognizeLinkedEntitiesActions { get; set; } /// - /// Analyze Sentiment actions configurations. + /// Analyze Sentiment actions. /// - public IReadOnlyCollection AnalyzeSentimentOptions { get; set; } + public IReadOnlyCollection AnalyzeSentimentActions { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClient.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClient.cs index 9483f304e1053..725fbd70dff78 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClient.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClient.cs @@ -2860,25 +2860,25 @@ private AnalyzeActionsOperation StartAnalyzeActions(MultiLanguageBatchInput batc options ??= new AnalyzeActionsOptions(); - if (actions.RecognizePiiEntitiesOptions != null) + if (actions.RecognizePiiEntitiesActions != null) { - tasks.EntityRecognitionPiiTasks = Transforms.ConvertFromPiiEntityOptionsToTasks(actions.RecognizePiiEntitiesOptions); + tasks.EntityRecognitionPiiTasks = Transforms.ConvertFromRecognizePiiEntitiesActionsToTasks(actions.RecognizePiiEntitiesActions); } - if (actions.RecognizeEntitiesOptions != null) + if (actions.RecognizeEntitiesActions != null) { - tasks.EntityRecognitionTasks = Transforms.ConvertFromEntityOptionsToTasks(actions.RecognizeEntitiesOptions); + tasks.EntityRecognitionTasks = Transforms.ConvertFromRecognizeEntitiesActionsToTasks(actions.RecognizeEntitiesActions); } - if (actions.ExtractKeyPhrasesOptions != null) + if (actions.ExtractKeyPhrasesActions != null) { - tasks.KeyPhraseExtractionTasks = Transforms.ConvertFromKeyPhrasesOptionsToTasks(actions.ExtractKeyPhrasesOptions); + tasks.KeyPhraseExtractionTasks = Transforms.ConvertFromExtractKeyPhrasesActionsToTasks(actions.ExtractKeyPhrasesActions); } - if (actions.RecognizeLinkedEntitiesOptions != null) + if (actions.RecognizeLinkedEntitiesActions != null) { - tasks.EntityLinkingTasks = Transforms.ConvertFromEntityLinkingOptionsToTasks(actions.RecognizeLinkedEntitiesOptions); + tasks.EntityLinkingTasks = Transforms.ConvertFromRecognizeLinkedEntitiesActionsToTasks(actions.RecognizeLinkedEntitiesActions); } - if (actions.AnalyzeSentimentOptions != null) + if (actions.AnalyzeSentimentActions != null) { - tasks.SentimentAnalysisTasks = Transforms.ConvertFromAnalyzeSentimentOptionsToTasks(actions.AnalyzeSentimentOptions); + tasks.SentimentAnalysisTasks = Transforms.ConvertFromAnalyzeSentimentActionsToTasks(actions.AnalyzeSentimentActions); } AnalyzeBatchInput analyzeDocumentInputs = new AnalyzeBatchInput(batchInput, tasks) { DisplayName = actions.DisplayName }; @@ -2908,25 +2908,25 @@ private async Task StartAnalyzeActionsAsync(MultiLangua options ??= new AnalyzeActionsOptions(); - if (actions.RecognizePiiEntitiesOptions != null) + if (actions.RecognizePiiEntitiesActions != null) { - tasks.EntityRecognitionPiiTasks = Transforms.ConvertFromPiiEntityOptionsToTasks(actions.RecognizePiiEntitiesOptions); + tasks.EntityRecognitionPiiTasks = Transforms.ConvertFromRecognizePiiEntitiesActionsToTasks(actions.RecognizePiiEntitiesActions); } - if (actions.RecognizeEntitiesOptions != null) + if (actions.RecognizeEntitiesActions != null) { - tasks.EntityRecognitionTasks = Transforms.ConvertFromEntityOptionsToTasks(actions.RecognizeEntitiesOptions); + tasks.EntityRecognitionTasks = Transforms.ConvertFromRecognizeEntitiesActionsToTasks(actions.RecognizeEntitiesActions); } - if (actions.ExtractKeyPhrasesOptions != null) + if (actions.ExtractKeyPhrasesActions != null) { - tasks.KeyPhraseExtractionTasks = Transforms.ConvertFromKeyPhrasesOptionsToTasks(actions.ExtractKeyPhrasesOptions); + tasks.KeyPhraseExtractionTasks = Transforms.ConvertFromExtractKeyPhrasesActionsToTasks(actions.ExtractKeyPhrasesActions); } - if (actions.RecognizeLinkedEntitiesOptions != null) + if (actions.RecognizeLinkedEntitiesActions != null) { - tasks.EntityLinkingTasks = Transforms.ConvertFromEntityLinkingOptionsToTasks(actions.RecognizeLinkedEntitiesOptions); + tasks.EntityLinkingTasks = Transforms.ConvertFromRecognizeLinkedEntitiesActionsToTasks(actions.RecognizeLinkedEntitiesActions); } - if (actions.AnalyzeSentimentOptions != null) + if (actions.AnalyzeSentimentActions != null) { - tasks.SentimentAnalysisTasks = Transforms.ConvertFromAnalyzeSentimentOptionsToTasks(actions.AnalyzeSentimentOptions); + tasks.SentimentAnalysisTasks = Transforms.ConvertFromAnalyzeSentimentActionsToTasks(actions.AnalyzeSentimentActions); } AnalyzeBatchInput analyzeDocumentInputs = new AnalyzeBatchInput(batchInput, tasks) { DisplayName = actions.DisplayName }; diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsRequestOptions.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsRequestOptions.cs index 59e76b1b2f36a..135d500d9614d 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsRequestOptions.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsRequestOptions.cs @@ -6,14 +6,15 @@ namespace Azure.AI.TextAnalytics /// /// Options that allow callers to specify details about how the operation /// is run and what information is returned from it by the service. - /// For example set model version, and whether to include statistics. + /// For example, set model version, whether to include statistics, + /// and more. /// public class TextAnalyticsRequestOptions { /// /// Initializes a new instance of the /// class which allows callers to specify details about how the operation - /// is run. For example set model version, and whether to include statistics. + /// is run. For example, set model version, whether to include statistics, and more. /// public TextAnalyticsRequestOptions() { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs index a09b460d15e9a..5e4327983a191 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs @@ -320,128 +320,128 @@ private static int ParseHealthcareEntityIndex(string reference) #region Analyze Operation - internal static PiiTask ConvertToPiiTask(RecognizePiiEntitiesOptions option) + internal static PiiTask ConvertToPiiTask(RecognizePiiEntitiesAction action) { return new PiiTask() { Parameters = new PiiTaskParameters() { - Domain = option.DomainFilter.HasValue ? option.DomainFilter.Value.GetString() : (PiiTaskParametersDomain?)null, - ModelVersion = option.ModelVersion, - StringIndexType = option.StringIndexType, - LoggingOptOut = option.DisableServiceLogs + Domain = action.DomainFilter.HasValue ? action.DomainFilter.Value.GetString() : (PiiTaskParametersDomain?)null, + ModelVersion = action.ModelVersion, + StringIndexType = action.StringIndexType, + LoggingOptOut = action.DisableServiceLogs // Categories are not enabled because of https://github.com/Azure/azure-sdk-for-net/issues/19237 } }; } - internal static EntityLinkingTask ConvertToLinkedEntitiesTask(RecognizeLinkedEntitiesOptions option) + internal static EntityLinkingTask ConvertToLinkedEntitiesTask(RecognizeLinkedEntitiesAction action) { return new EntityLinkingTask() { Parameters = new EntityLinkingTaskParameters() { - ModelVersion = option.ModelVersion, - StringIndexType = option.StringIndexType, - LoggingOptOut = option.DisableServiceLogs + ModelVersion = action.ModelVersion, + StringIndexType = action.StringIndexType, + LoggingOptOut = action.DisableServiceLogs } }; } - internal static EntitiesTask ConvertToEntitiesTask(RecognizeEntitiesOptions option) + internal static EntitiesTask ConvertToEntitiesTask(RecognizeEntitiesAction action) { return new EntitiesTask() { Parameters = new EntitiesTaskParameters() { - ModelVersion = option.ModelVersion, - StringIndexType = option.StringIndexType, - LoggingOptOut = option.DisableServiceLogs + ModelVersion = action.ModelVersion, + StringIndexType = action.StringIndexType, + LoggingOptOut = action.DisableServiceLogs } }; } - internal static KeyPhrasesTask ConvertToKeyPhrasesTask(ExtractKeyPhrasesOptions option) + internal static KeyPhrasesTask ConvertToKeyPhrasesTask(ExtractKeyPhrasesAction action) { return new KeyPhrasesTask() { Parameters = new KeyPhrasesTaskParameters() { - ModelVersion = option.ModelVersion, - LoggingOptOut = option.DisableServiceLogs + ModelVersion = action.ModelVersion, + LoggingOptOut = action.DisableServiceLogs } }; } - internal static SentimentAnalysisTask ConvertToSentimentAnalysisTask(AnalyzeSentimentOptions option) + internal static SentimentAnalysisTask ConvertToSentimentAnalysisTask(AnalyzeSentimentAction action) { return new SentimentAnalysisTask() { Parameters = new SentimentAnalysisTaskParameters() { - ModelVersion = option.ModelVersion, - StringIndexType = option.StringIndexType, - LoggingOptOut = option.DisableServiceLogs, - OpinionMining = option.IncludeOpinionMining + ModelVersion = action.ModelVersion, + StringIndexType = action.StringIndexType, + LoggingOptOut = action.DisableServiceLogs, + OpinionMining = action.IncludeOpinionMining } }; } - internal static IList ConvertFromEntityLinkingOptionsToTasks(IReadOnlyCollection recognizeLinkedEntityOptions) + internal static IList ConvertFromRecognizeLinkedEntitiesActionsToTasks(IReadOnlyCollection recognizeLinkedEntitiesActions) { List list = new List(); - foreach (RecognizeLinkedEntitiesOptions option in recognizeLinkedEntityOptions) + foreach (RecognizeLinkedEntitiesAction action in recognizeLinkedEntitiesActions) { - list.Add(ConvertToLinkedEntitiesTask(option)); + list.Add(ConvertToLinkedEntitiesTask(action)); } return list; } - internal static IList ConvertFromEntityOptionsToTasks(IReadOnlyCollection recognizeEntitiesOptions) + internal static IList ConvertFromRecognizeEntitiesActionsToTasks(IReadOnlyCollection recognizeEntitiesActions) { List list = new List(); - foreach (RecognizeEntitiesOptions option in recognizeEntitiesOptions) + foreach (RecognizeEntitiesAction action in recognizeEntitiesActions) { - list.Add(ConvertToEntitiesTask(option)); + list.Add(ConvertToEntitiesTask(action)); } return list; } - internal static IList ConvertFromKeyPhrasesOptionsToTasks(IReadOnlyCollection extractKeyPhrasesOptions) + internal static IList ConvertFromExtractKeyPhrasesActionsToTasks(IReadOnlyCollection extractKeyPhrasesActions) { List list = new List(); - foreach (ExtractKeyPhrasesOptions option in extractKeyPhrasesOptions) + foreach (ExtractKeyPhrasesAction action in extractKeyPhrasesActions) { - list.Add(ConvertToKeyPhrasesTask(option)); + list.Add(ConvertToKeyPhrasesTask(action)); } return list; } - internal static IList ConvertFromPiiEntityOptionsToTasks(IReadOnlyCollection recognizePiiEntityOptions) + internal static IList ConvertFromRecognizePiiEntitiesActionsToTasks(IReadOnlyCollection recognizePiiEntitiesActions) { List list = new List(); - foreach (RecognizePiiEntitiesOptions option in recognizePiiEntityOptions) + foreach (RecognizePiiEntitiesAction action in recognizePiiEntitiesActions) { - list.Add(ConvertToPiiTask(option)); + list.Add(ConvertToPiiTask(action)); } return list; } - internal static IList ConvertFromAnalyzeSentimentOptionsToTasks(IReadOnlyCollection analyzeSentimentOptions) + internal static IList ConvertFromAnalyzeSentimentActionsToTasks(IReadOnlyCollection analyzeSentimentActions) { List list = new List(); - foreach (AnalyzeSentimentOptions option in analyzeSentimentOptions) + foreach (AnalyzeSentimentAction action in analyzeSentimentActions) { - list.Add(ConvertToSentimentAnalysisTask(option)); + list.Add(ConvertToSentimentAnalysisTask(action)); } return list; diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs index 6b9f0cc7eef18..5c644078c09c1 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs @@ -39,7 +39,7 @@ public async Task AnalyzeOperationWithAADTest() TextAnalyticsActions batchActions = new TextAnalyticsActions() { - ExtractKeyPhrasesOptions = new List() { new ExtractKeyPhrasesOptions() }, + ExtractKeyPhrasesActions = new List() { new ExtractKeyPhrasesAction() }, }; AnalyzeActionsOperation operation = await client.StartAnalyzeActionsAsync(batchDocuments, batchActions); @@ -62,7 +62,7 @@ public async Task AnalyzeOperationTest() TextAnalyticsActions batchActions = new TextAnalyticsActions() { - ExtractKeyPhrasesOptions = new List() { new ExtractKeyPhrasesOptions() }, + ExtractKeyPhrasesActions = new List() { new ExtractKeyPhrasesAction() }, }; AnalyzeActionsOperation operation = await client.StartAnalyzeActionsAsync(batchConvenienceDocuments, batchActions, "en"); @@ -120,7 +120,7 @@ public async Task AnalyzeOperationWithLanguageTest() TextAnalyticsActions batchActions = new TextAnalyticsActions() { - ExtractKeyPhrasesOptions = new List() { new ExtractKeyPhrasesOptions() }, + ExtractKeyPhrasesActions = new List() { new ExtractKeyPhrasesAction() }, DisplayName = "AnalyzeOperationWithLanguageTest" }; @@ -173,11 +173,11 @@ public async Task AnalyzeOperationWithMultipleActions() TextAnalyticsActions batchActions = new TextAnalyticsActions() { - ExtractKeyPhrasesOptions = new List() { new ExtractKeyPhrasesOptions() }, - RecognizeEntitiesOptions = new List() { new RecognizeEntitiesOptions() }, - RecognizePiiEntitiesOptions = new List() { new RecognizePiiEntitiesOptions() }, - RecognizeLinkedEntitiesOptions = new List() { new RecognizeLinkedEntitiesOptions() }, - AnalyzeSentimentOptions = new List() { new AnalyzeSentimentOptions() }, + ExtractKeyPhrasesActions = new List() { new ExtractKeyPhrasesAction() }, + RecognizeEntitiesActions = new List() { new RecognizeEntitiesAction() }, + RecognizePiiEntitiesActions = new List() { new RecognizePiiEntitiesAction() }, + RecognizeLinkedEntitiesActions = new List() { new RecognizeLinkedEntitiesAction() }, + AnalyzeSentimentActions = new List() { new AnalyzeSentimentAction() }, DisplayName = "AnalyzeOperationWithMultipleTasks" }; @@ -300,7 +300,7 @@ public async Task AnalyzeOperationWithPagination() TextAnalyticsActions batchActions = new TextAnalyticsActions() { - ExtractKeyPhrasesOptions = new List() { new ExtractKeyPhrasesOptions() }, + ExtractKeyPhrasesActions = new List() { new ExtractKeyPhrasesAction() }, DisplayName = "AnalyzeOperationWithPagination", }; @@ -351,10 +351,10 @@ public void AnalyzeOperationWithErrorTest() }; TextAnalyticsActions batchActions = new TextAnalyticsActions() { - ExtractKeyPhrasesOptions = new List() + ExtractKeyPhrasesActions = new List() { - new ExtractKeyPhrasesOptions(), - new ExtractKeyPhrasesOptions() + new ExtractKeyPhrasesAction(), + new ExtractKeyPhrasesAction() { ModelVersion = "InvalidVersion" } @@ -379,9 +379,9 @@ public async Task AnalyzeOperationWithErrorsInDocumentTest() }; TextAnalyticsActions batchActions = new TextAnalyticsActions() { - ExtractKeyPhrasesOptions = new List() + ExtractKeyPhrasesActions = new List() { - new ExtractKeyPhrasesOptions() + new ExtractKeyPhrasesAction() } }; @@ -415,7 +415,7 @@ public async Task AnalyzeOperationWithPHIDomain() TextAnalyticsActions batchActions = new TextAnalyticsActions() { - RecognizePiiEntitiesOptions = new List() { new RecognizePiiEntitiesOptions() { DomainFilter = PiiEntityDomainType.ProtectedHealthInformation } }, + RecognizePiiEntitiesActions = new List() { new RecognizePiiEntitiesAction() { DomainFilter = PiiEntityDomainType.ProtectedHealthInformation } }, DisplayName = "AnalyzeOperationWithPHIDomain", }; @@ -462,7 +462,7 @@ public async Task AnalyzeOperationWithStatisticsTest() TextAnalyticsActions batchActions = new TextAnalyticsActions() { - ExtractKeyPhrasesOptions = new List() { new ExtractKeyPhrasesOptions() }, + ExtractKeyPhrasesActions = new List() { new ExtractKeyPhrasesAction() }, DisplayName = "AnalyzeOperationTest", }; @@ -500,11 +500,11 @@ public async Task AnalyzeOperationAllActionsAndDisableServiceLogs () TextAnalyticsActions batchActions = new TextAnalyticsActions() { - ExtractKeyPhrasesOptions = new List() { new ExtractKeyPhrasesOptions() { DisableServiceLogs = true } }, - RecognizeEntitiesOptions = new List() { new RecognizeEntitiesOptions() { DisableServiceLogs = true } }, - RecognizePiiEntitiesOptions = new List() { new RecognizePiiEntitiesOptions() { DisableServiceLogs = false } }, - RecognizeLinkedEntitiesOptions = new List() { new RecognizeLinkedEntitiesOptions() { DisableServiceLogs = true } }, - AnalyzeSentimentOptions = new List() { new AnalyzeSentimentOptions() { DisableServiceLogs = true } }, + ExtractKeyPhrasesActions = new List() { new ExtractKeyPhrasesAction() { DisableServiceLogs = true } }, + RecognizeEntitiesActions = new List() { new RecognizeEntitiesAction() { DisableServiceLogs = true } }, + RecognizePiiEntitiesActions = new List() { new RecognizePiiEntitiesAction() { DisableServiceLogs = false } }, + RecognizeLinkedEntitiesActions = new List() { new RecognizeLinkedEntitiesAction() { DisableServiceLogs = true } }, + AnalyzeSentimentActions = new List() { new AnalyzeSentimentAction() { DisableServiceLogs = true } }, }; AnalyzeActionsOperation operation = await client.StartAnalyzeActionsAsync(batchConvenienceDocuments, batchActions); @@ -548,7 +548,7 @@ public async Task AnalyzeOperationAnalyzeSentimentWithOpinionMining() TextAnalyticsActions batchActions = new TextAnalyticsActions() { - AnalyzeSentimentOptions = new List() { new AnalyzeSentimentOptions() { IncludeOpinionMining = true } }, + AnalyzeSentimentActions = new List() { new AnalyzeSentimentAction() { IncludeOpinionMining = true } }, DisplayName = "AnalyzeOperationWithOpinionMining", }; diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsClientMockTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsClientMockTests.cs index 9456629bc3cbc..0cadbddad7049 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsClientMockTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsClientMockTests.cs @@ -677,14 +677,14 @@ public async Task AnalyzeOperationKeyPhrasesWithDisableServiceLogs() "Elon Musk is the CEO of SpaceX and Tesla." }; - var options = new ExtractKeyPhrasesOptions() + var actions = new ExtractKeyPhrasesAction() { DisableServiceLogs = true }; TextAnalyticsActions batchActions = new TextAnalyticsActions() { - ExtractKeyPhrasesOptions = new List() { options }, + ExtractKeyPhrasesActions = new List() { actions }, }; await client.StartAnalyzeActionsAsync(documents, batchActions); @@ -715,14 +715,14 @@ public async Task AnalyzeOperationRecognizeEntitiesWithDisableServiceLogs() "Elon Musk is the CEO of SpaceX and Tesla." }; - var options = new RecognizeEntitiesOptions() + var actions = new RecognizeEntitiesAction() { DisableServiceLogs = true }; TextAnalyticsActions batchActions = new TextAnalyticsActions() { - RecognizeEntitiesOptions = new List() { options }, + RecognizeEntitiesActions = new List() { actions }, }; await client.StartAnalyzeActionsAsync(documents, batchActions); @@ -753,14 +753,14 @@ public async Task AnalyzeOperationRecognizeLinkedEntitiesWithDisableServiceLogs( "Elon Musk is the CEO of SpaceX and Tesla." }; - var options = new RecognizeLinkedEntitiesOptions() + var actions = new RecognizeLinkedEntitiesAction() { DisableServiceLogs = true }; TextAnalyticsActions batchActions = new TextAnalyticsActions() { - RecognizeLinkedEntitiesOptions = new List() { options }, + RecognizeLinkedEntitiesActions = new List() { actions }, }; await client.StartAnalyzeActionsAsync(documents, batchActions); @@ -791,14 +791,14 @@ public async Task AnalyzeOperationRecognizePiiEntitiesWithDisableServiceLogs() "Elon Musk is the CEO of SpaceX and Tesla." }; - var options = new RecognizePiiEntitiesOptions() + var actions = new RecognizePiiEntitiesAction() { DisableServiceLogs = true }; TextAnalyticsActions batchActions = new TextAnalyticsActions() { - RecognizePiiEntitiesOptions = new List() { options }, + RecognizePiiEntitiesActions = new List() { actions }, }; await client.StartAnalyzeActionsAsync(documents, batchActions); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperation.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperation.cs index af271937a193e..e77b5b67919c7 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperation.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperation.cs @@ -47,11 +47,11 @@ We tried again today and it was amazing. Everyone in my family liked the trail a TextAnalyticsActions actions = new TextAnalyticsActions() { - ExtractKeyPhrasesOptions = new List() { new ExtractKeyPhrasesOptions() }, - RecognizeEntitiesOptions = new List() { new RecognizeEntitiesOptions() }, - RecognizePiiEntitiesOptions = new List() { new RecognizePiiEntitiesOptions() }, - RecognizeLinkedEntitiesOptions = new List() { new RecognizeLinkedEntitiesOptions() }, - AnalyzeSentimentOptions = new List() { new AnalyzeSentimentOptions() }, + ExtractKeyPhrasesActions = new List() { new ExtractKeyPhrasesAction() }, + RecognizeEntitiesActions = new List() { new RecognizeEntitiesAction() }, + RecognizePiiEntitiesActions = new List() { new RecognizePiiEntitiesAction() }, + RecognizeLinkedEntitiesActions = new List() { new RecognizeLinkedEntitiesAction() }, + AnalyzeSentimentActions = new List() { new AnalyzeSentimentAction() }, DisplayName = "AnalyzeOperationSample" }; diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperationAsync.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperationAsync.cs index 0d672c4e0772b..b07e21c09da24 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperationAsync.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperationAsync.cs @@ -47,11 +47,11 @@ We tried again today and it was amazing. Everyone in my family liked the trail a TextAnalyticsActions actions = new TextAnalyticsActions() { - ExtractKeyPhrasesOptions = new List() { new ExtractKeyPhrasesOptions() }, - RecognizeEntitiesOptions = new List() { new RecognizeEntitiesOptions() }, - RecognizePiiEntitiesOptions = new List() { new RecognizePiiEntitiesOptions() }, - RecognizeLinkedEntitiesOptions = new List() { new RecognizeLinkedEntitiesOptions() }, - AnalyzeSentimentOptions = new List() { new AnalyzeSentimentOptions() }, + ExtractKeyPhrasesActions = new List() { new ExtractKeyPhrasesAction() }, + RecognizeEntitiesActions = new List() { new RecognizeEntitiesAction() }, + RecognizePiiEntitiesActions = new List() { new RecognizePiiEntitiesAction() }, + RecognizeLinkedEntitiesActions = new List() { new RecognizeLinkedEntitiesAction() }, + AnalyzeSentimentActions = new List() { new AnalyzeSentimentAction() }, DisplayName = "AnalyzeOperationSample" }; diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperationConvenience.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperationConvenience.cs index bc84456ea4bd2..ecb3568e066de 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperationConvenience.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperationConvenience.cs @@ -40,11 +40,11 @@ We tried again today and it was amazing. Everyone in my family liked the trail a TextAnalyticsActions actions = new TextAnalyticsActions() { - ExtractKeyPhrasesOptions = new List() { new ExtractKeyPhrasesOptions() }, - RecognizeEntitiesOptions = new List() { new RecognizeEntitiesOptions() }, - RecognizePiiEntitiesOptions = new List() { new RecognizePiiEntitiesOptions() }, - RecognizeLinkedEntitiesOptions = new List() { new RecognizeLinkedEntitiesOptions() }, - AnalyzeSentimentOptions = new List() { new AnalyzeSentimentOptions() }, + ExtractKeyPhrasesActions = new List() { new ExtractKeyPhrasesAction() }, + RecognizeEntitiesActions = new List() { new RecognizeEntitiesAction() }, + RecognizePiiEntitiesActions = new List() { new RecognizePiiEntitiesAction() }, + RecognizeLinkedEntitiesActions = new List() { new RecognizeLinkedEntitiesAction() }, + AnalyzeSentimentActions = new List() { new AnalyzeSentimentAction() }, DisplayName = "AnalyzeOperationSample" }; diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperationConvenienceAsync.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperationConvenienceAsync.cs index 9b549bf0e584d..56e8f240b9d04 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperationConvenienceAsync.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperationConvenienceAsync.cs @@ -41,11 +41,11 @@ We tried again today and it was amazing. Everyone in my family liked the trail a TextAnalyticsActions actions = new TextAnalyticsActions() { - ExtractKeyPhrasesOptions = new List() { new ExtractKeyPhrasesOptions() }, - RecognizeEntitiesOptions = new List() { new RecognizeEntitiesOptions() }, - RecognizePiiEntitiesOptions = new List() { new RecognizePiiEntitiesOptions() }, - RecognizeLinkedEntitiesOptions = new List() { new RecognizeLinkedEntitiesOptions() }, - AnalyzeSentimentOptions = new List() { new AnalyzeSentimentOptions() }, + ExtractKeyPhrasesActions = new List() { new ExtractKeyPhrasesAction() }, + RecognizeEntitiesActions = new List() { new RecognizeEntitiesAction() }, + RecognizePiiEntitiesActions = new List() { new RecognizePiiEntitiesAction() }, + RecognizeLinkedEntitiesActions = new List() { new RecognizeLinkedEntitiesAction() }, + AnalyzeSentimentActions = new List() { new AnalyzeSentimentAction() }, DisplayName = "AnalyzeOperationSample" };