From a475282f2d7b8baec6be81ac83f4d0023274225f Mon Sep 17 00:00:00 2001 From: Salah Mostafa Date: Sun, 10 Oct 2021 17:44:50 +0200 Subject: [PATCH 01/16] exposed ActionName --- .../Azure.AI.TextAnalytics.netstandard2.0.cs | 43 +++++++----- .../src/AnalyzeSentimentAction.cs | 5 ++ .../src/AnalyzeSentimentActionResult.cs | 8 +-- .../src/ExtractKeyPhrasesAction.cs | 5 ++ .../src/ExtractKeyPhrasesActionResult.cs | 8 +-- .../src/ExtractSummaryAction.cs | 5 ++ .../src/ExtractSummaryActionResult.cs | 8 +-- .../src/MultiCategoryClassifyAction.cs | 5 ++ .../src/MultiCategoryClassifyActionResult.cs | 8 +-- .../src/RecognizeEntitiesAction.cs | 5 ++ .../src/RecognizeEntitiesActionResult.cs | 8 +-- .../src/RecognizeLinkedEntitiesAction.cs | 5 ++ .../RecognizeLinkedEntitiesActionResult.cs | 8 +-- .../src/RecognizePiiEntitiesAction.cs | 5 ++ .../src/RecognizePiiEntitiesActionResult.cs | 8 +-- .../src/SingleCategoryClassifyAction.cs | 5 ++ .../src/SingleCategoryClassifyActionResult.cs | 8 +-- .../src/TextAnalyticsActionResult.cs | 11 +++- .../src/TextAnalyticsModelFactory.cs | 66 ++++++++++++++----- .../Azure.AI.TextAnalytics/src/Transforms.cs | 56 +++++++++------- 20 files changed, 187 insertions(+), 93 deletions(-) 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 11432f537249..c4ed807cab34 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 @@ -88,6 +88,7 @@ public partial class AnalyzeSentimentAction { public AnalyzeSentimentAction() { } public AnalyzeSentimentAction(Azure.AI.TextAnalytics.AnalyzeSentimentOptions options) { } + public string ActionName { get { throw null; } set { } } public bool? DisableServiceLogs { get { throw null; } set { } } public bool? IncludeOpinionMining { get { throw null; } set { } } public string ModelVersion { get { throw null; } set { } } @@ -248,6 +249,7 @@ public partial class ExtractKeyPhrasesAction { public ExtractKeyPhrasesAction() { } public ExtractKeyPhrasesAction(Azure.AI.TextAnalytics.TextAnalyticsRequestOptions options) { } + public string ActionName { get { throw null; } set { } } public bool? DisableServiceLogs { get { throw null; } set { } } public string ModelVersion { get { throw null; } set { } } } @@ -270,6 +272,7 @@ internal ExtractKeyPhrasesResultCollection() : base (default(System.Collections. public partial class ExtractSummaryAction { public ExtractSummaryAction() { } + public string ActionName { get { throw null; } set { } } public bool? DisableServiceLogs { get { throw null; } set { } } public int? MaxSentenceCount { get { throw null; } set { } } public string ModelVersion { get { throw null; } set { } } @@ -439,6 +442,7 @@ public readonly partial struct LinkedEntityMatch public partial class MultiCategoryClassifyAction { public MultiCategoryClassifyAction(string projectName, string deploymentName) { } + public string ActionName { get { throw null; } set { } } public string DeploymentName { get { throw null; } } public bool? DisableServiceLogs { get { throw null; } set { } } public string ProjectName { get { throw null; } } @@ -696,6 +700,7 @@ public partial class RecognizeEntitiesAction { public RecognizeEntitiesAction() { } public RecognizeEntitiesAction(Azure.AI.TextAnalytics.TextAnalyticsRequestOptions options) { } + public string ActionName { get { throw null; } set { } } public bool? DisableServiceLogs { get { throw null; } set { } } public string ModelVersion { get { throw null; } set { } } } @@ -719,6 +724,7 @@ public partial class RecognizeLinkedEntitiesAction { public RecognizeLinkedEntitiesAction() { } public RecognizeLinkedEntitiesAction(Azure.AI.TextAnalytics.TextAnalyticsRequestOptions options) { } + public string ActionName { get { throw null; } set { } } public bool? DisableServiceLogs { get { throw null; } set { } } public string ModelVersion { get { throw null; } set { } } } @@ -742,6 +748,7 @@ public partial class RecognizePiiEntitiesAction { public RecognizePiiEntitiesAction() { } public RecognizePiiEntitiesAction(Azure.AI.TextAnalytics.RecognizePiiEntitiesOptions options) { } + public string ActionName { get { throw null; } set { } } public System.Collections.Generic.IList CategoriesFilter { get { throw null; } } public bool? DisableServiceLogs { get { throw null; } set { } } public Azure.AI.TextAnalytics.PiiEntityDomain DomainFilter { get { throw null; } set { } } @@ -799,6 +806,7 @@ internal SentimentConfidenceScores() { } public partial class SingleCategoryClassifyAction { public SingleCategoryClassifyAction(string projectName, string deploymentName) { } + public string ActionName { get { throw null; } set { } } public string DeploymentName { get { throw null; } } public bool? DisableServiceLogs { get { throw null; } set { } } public string ProjectName { get { throw null; } } @@ -855,6 +863,7 @@ public readonly partial struct TargetSentiment public partial class TextAnalyticsActionResult { internal TextAnalyticsActionResult() { } + public string ActionName { get { throw null; } } public System.DateTimeOffset CompletedOn { get { throw null; } } public Azure.AI.TextAnalytics.TextAnalyticsError Error { get { throw null; } } public bool HasError { get { throw null; } } @@ -1008,8 +1017,8 @@ public static partial class TextAnalyticsModelFactory public static Azure.AI.TextAnalytics.AnalyzeHealthcareEntitiesResult AnalyzeHealthcareEntitiesResult(string id, Azure.AI.TextAnalytics.TextDocumentStatistics statistics, System.Collections.Generic.IEnumerable healthcareEntities, System.Collections.Generic.IEnumerable entityRelations, System.Collections.Generic.IEnumerable warnings) { throw null; } public static Azure.AI.TextAnalytics.AnalyzeHealthcareEntitiesResult AnalyzeHealthcareEntitiesResult(string id, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.AnalyzeHealthcareEntitiesResultCollection AnalyzeHealthcareEntitiesResultCollection(System.Collections.Generic.IEnumerable list, Azure.AI.TextAnalytics.TextDocumentBatchStatistics statistics, string modelVersion) { throw null; } - public static Azure.AI.TextAnalytics.AnalyzeSentimentActionResult AnalyzeSentimentActionResult(Azure.AI.TextAnalytics.AnalyzeSentimentResultCollection result, System.DateTimeOffset completedOn) { throw null; } - public static Azure.AI.TextAnalytics.AnalyzeSentimentActionResult AnalyzeSentimentActionResult(System.DateTimeOffset completedOn, string code, string message) { throw null; } + public static Azure.AI.TextAnalytics.AnalyzeSentimentActionResult AnalyzeSentimentActionResult(Azure.AI.TextAnalytics.AnalyzeSentimentResultCollection result, string actionName, System.DateTimeOffset completedOn) { throw null; } + public static Azure.AI.TextAnalytics.AnalyzeSentimentActionResult AnalyzeSentimentActionResult(string actionName, System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.AnalyzeSentimentResult AnalyzeSentimentResult(string id, Azure.AI.TextAnalytics.TextAnalyticsError error) { throw null; } public static Azure.AI.TextAnalytics.AnalyzeSentimentResult AnalyzeSentimentResult(string id, Azure.AI.TextAnalytics.TextDocumentStatistics statistics, Azure.AI.TextAnalytics.DocumentSentiment documentSentiment) { throw null; } public static Azure.AI.TextAnalytics.AnalyzeSentimentResultCollection AnalyzeSentimentResultCollection(System.Collections.Generic.IEnumerable list, Azure.AI.TextAnalytics.TextDocumentBatchStatistics statistics, string modelVersion) { throw null; } @@ -1026,13 +1035,13 @@ public static partial class TextAnalyticsModelFactory public static Azure.AI.TextAnalytics.DetectLanguageResultCollection DetectLanguageResultCollection(System.Collections.Generic.IEnumerable list, Azure.AI.TextAnalytics.TextDocumentBatchStatistics statistics, string modelVersion) { throw null; } public static Azure.AI.TextAnalytics.DocumentSentiment DocumentSentiment(Azure.AI.TextAnalytics.TextSentiment sentiment, double positiveScore, double neutralScore, double negativeScore, System.Collections.Generic.List sentenceSentiments, System.Collections.Generic.IList warnings = null) { throw null; } public static Azure.AI.TextAnalytics.EntityDataSource EntityDataSource(string name = null, string entityId = null) { throw null; } - public static Azure.AI.TextAnalytics.ExtractKeyPhrasesActionResult ExtractKeyPhrasesActionResult(Azure.AI.TextAnalytics.ExtractKeyPhrasesResultCollection result, System.DateTimeOffset completedOn) { throw null; } - public static Azure.AI.TextAnalytics.ExtractKeyPhrasesActionResult ExtractKeyPhrasesActionResult(System.DateTimeOffset completedOn, string code, string message) { throw null; } + public static Azure.AI.TextAnalytics.ExtractKeyPhrasesActionResult ExtractKeyPhrasesActionResult(Azure.AI.TextAnalytics.ExtractKeyPhrasesResultCollection result, string actionName, System.DateTimeOffset completedOn) { throw null; } + public static Azure.AI.TextAnalytics.ExtractKeyPhrasesActionResult ExtractKeyPhrasesActionResult(string actionName, System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.ExtractKeyPhrasesResult ExtractKeyPhrasesResult(string id, Azure.AI.TextAnalytics.TextAnalyticsError error) { throw null; } public static Azure.AI.TextAnalytics.ExtractKeyPhrasesResult ExtractKeyPhrasesResult(string id, Azure.AI.TextAnalytics.TextDocumentStatistics statistics, Azure.AI.TextAnalytics.KeyPhraseCollection keyPhrases) { throw null; } public static Azure.AI.TextAnalytics.ExtractKeyPhrasesResultCollection ExtractKeyPhrasesResultCollection(System.Collections.Generic.IEnumerable list, Azure.AI.TextAnalytics.TextDocumentBatchStatistics statistics, string modelVersion) { throw null; } - public static Azure.AI.TextAnalytics.ExtractSummaryActionResult ExtractSummaryActionResult(Azure.AI.TextAnalytics.ExtractSummaryResultCollection result, System.DateTimeOffset completedOn) { throw null; } - public static Azure.AI.TextAnalytics.ExtractSummaryActionResult ExtractSummaryActionResult(System.DateTimeOffset completedOn, string code, string message) { throw null; } + public static Azure.AI.TextAnalytics.ExtractSummaryActionResult ExtractSummaryActionResult(Azure.AI.TextAnalytics.ExtractSummaryResultCollection result, string actionName, System.DateTimeOffset completedOn) { throw null; } + public static Azure.AI.TextAnalytics.ExtractSummaryActionResult ExtractSummaryActionResult(string actionName, System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.ExtractSummaryResult ExtractSummaryResult(string id, Azure.AI.TextAnalytics.TextAnalyticsError error) { throw null; } public static Azure.AI.TextAnalytics.ExtractSummaryResult ExtractSummaryResult(string id, Azure.AI.TextAnalytics.TextDocumentStatistics statistics, Azure.AI.TextAnalytics.SummarySentenceCollection sentences) { throw null; } public static Azure.AI.TextAnalytics.ExtractSummaryResultCollection ExtractSummaryResultCollection(System.Collections.Generic.IEnumerable list, Azure.AI.TextAnalytics.TextDocumentBatchStatistics statistics, string modelVersion) { throw null; } @@ -1048,27 +1057,25 @@ public static partial class TextAnalyticsModelFactory [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.AI.TextAnalytics.LinkedEntityMatch LinkedEntityMatch(string text, double score) { throw null; } public static Azure.AI.TextAnalytics.LinkedEntityMatch LinkedEntityMatch(string text, double score, int offset, int length) { throw null; } - public static Azure.AI.TextAnalytics.MultiCategoryClassifyActionResult MultiCategoryClassifyActionResult(Azure.AI.TextAnalytics.MultiCategoryClassifyResultCollection result, System.DateTimeOffset completedOn) { throw null; } - public static Azure.AI.TextAnalytics.MultiCategoryClassifyActionResult MultiCategoryClassifyActionResult(System.DateTimeOffset completedOn, string code, string message) { throw null; } + public static Azure.AI.TextAnalytics.MultiCategoryClassifyActionResult MultiCategoryClassifyActionResult(Azure.AI.TextAnalytics.MultiCategoryClassifyResultCollection result, string actionName, System.DateTimeOffset completedOn) { throw null; } + public static Azure.AI.TextAnalytics.MultiCategoryClassifyActionResult MultiCategoryClassifyActionResult(string actionName, System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.MultiCategoryClassifyResult MultiCategoryClassifyResult(string id, Azure.AI.TextAnalytics.TextAnalyticsError error) { throw null; } public static Azure.AI.TextAnalytics.MultiCategoryClassifyResult MultiCategoryClassifyResult(string id, Azure.AI.TextAnalytics.TextDocumentStatistics statistics, Azure.AI.TextAnalytics.ClassificationCategoryCollection documentClassificationCollection, System.Collections.Generic.IEnumerable warnings = null) { throw null; } public static Azure.AI.TextAnalytics.MultiCategoryClassifyResultCollection MultiCategoryClassifyResultCollection(System.Collections.Generic.IEnumerable classificationResultList, Azure.AI.TextAnalytics.TextDocumentBatchStatistics statistics, string projectName, string deploymentName) { throw null; } public static Azure.AI.TextAnalytics.PiiEntity PiiEntity(string text, string category, string subCategory, double score, int offset, int length) { throw null; } public static Azure.AI.TextAnalytics.PiiEntityCollection PiiEntityCollection(System.Collections.Generic.IEnumerable entities, string redactedText, System.Collections.Generic.IEnumerable warnings = null) { throw null; } - public static Azure.AI.TextAnalytics.RecognizeCustomEntitiesActionResult RecognizeCustomEntitiesActionResult(Azure.AI.TextAnalytics.RecognizeCustomEntitiesResultCollection result, System.DateTimeOffset completedOn) { throw null; } - public static Azure.AI.TextAnalytics.RecognizeCustomEntitiesActionResult RecognizeCustomEntitiesActionResult(System.DateTimeOffset completedOn, string code, string message) { throw null; } - public static Azure.AI.TextAnalytics.RecognizeEntitiesActionResult RecognizeEntitiesActionResult(Azure.AI.TextAnalytics.RecognizeEntitiesResultCollection result, System.DateTimeOffset completedOn) { throw null; } - public static Azure.AI.TextAnalytics.RecognizeEntitiesActionResult RecognizeEntitiesActionResult(System.DateTimeOffset completedOn, string code, string message) { throw null; } + public static Azure.AI.TextAnalytics.RecognizeEntitiesActionResult RecognizeEntitiesActionResult(Azure.AI.TextAnalytics.RecognizeEntitiesResultCollection result, string actionName, System.DateTimeOffset completedOn) { throw null; } + public static Azure.AI.TextAnalytics.RecognizeEntitiesActionResult RecognizeEntitiesActionResult(string actionName, System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.RecognizeEntitiesResult RecognizeEntitiesResult(string id, Azure.AI.TextAnalytics.TextAnalyticsError error) { throw null; } public static Azure.AI.TextAnalytics.RecognizeEntitiesResult RecognizeEntitiesResult(string id, Azure.AI.TextAnalytics.TextDocumentStatistics statistics, Azure.AI.TextAnalytics.CategorizedEntityCollection entities) { throw null; } public static Azure.AI.TextAnalytics.RecognizeEntitiesResultCollection RecognizeEntitiesResultCollection(System.Collections.Generic.IEnumerable list, Azure.AI.TextAnalytics.TextDocumentBatchStatistics statistics, string modelVersion) { throw null; } - public static Azure.AI.TextAnalytics.RecognizeLinkedEntitiesActionResult RecognizeLinkedEntitiesActionResult(Azure.AI.TextAnalytics.RecognizeLinkedEntitiesResultCollection result, System.DateTimeOffset completedOn) { throw null; } - public static Azure.AI.TextAnalytics.RecognizeLinkedEntitiesActionResult RecognizeLinkedEntitiesActionResult(System.DateTimeOffset completedOn, string code, string message) { throw null; } + public static Azure.AI.TextAnalytics.RecognizeLinkedEntitiesActionResult RecognizeLinkedEntitiesActionResult(Azure.AI.TextAnalytics.RecognizeLinkedEntitiesResultCollection result, string actionName, System.DateTimeOffset completedOn) { throw null; } + public static Azure.AI.TextAnalytics.RecognizeLinkedEntitiesActionResult RecognizeLinkedEntitiesActionResult(string actionName, System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.RecognizeLinkedEntitiesResult RecognizeLinkedEntitiesResult(string id, Azure.AI.TextAnalytics.TextAnalyticsError error) { throw null; } public static Azure.AI.TextAnalytics.RecognizeLinkedEntitiesResult RecognizeLinkedEntitiesResult(string id, Azure.AI.TextAnalytics.TextDocumentStatistics statistics, Azure.AI.TextAnalytics.LinkedEntityCollection linkedEntities) { throw null; } public static Azure.AI.TextAnalytics.RecognizeLinkedEntitiesResultCollection RecognizeLinkedEntitiesResultCollection(System.Collections.Generic.IEnumerable list, Azure.AI.TextAnalytics.TextDocumentBatchStatistics statistics, string modelVersion) { throw null; } - public static Azure.AI.TextAnalytics.RecognizePiiEntitiesActionResult RecognizePiiEntitiesActionResult(Azure.AI.TextAnalytics.RecognizePiiEntitiesResultCollection result, System.DateTimeOffset completedOn) { throw null; } - public static Azure.AI.TextAnalytics.RecognizePiiEntitiesActionResult RecognizePiiEntitiesActionResult(System.DateTimeOffset completedOn, string code, string message) { throw null; } + public static Azure.AI.TextAnalytics.RecognizePiiEntitiesActionResult RecognizePiiEntitiesActionResult(Azure.AI.TextAnalytics.RecognizePiiEntitiesResultCollection result, string actionName, System.DateTimeOffset completedOn) { throw null; } + public static Azure.AI.TextAnalytics.RecognizePiiEntitiesActionResult RecognizePiiEntitiesActionResult(string actionName, System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.RecognizePiiEntitiesResult RecognizePiiEntitiesResult(string id, Azure.AI.TextAnalytics.TextAnalyticsError error) { throw null; } public static Azure.AI.TextAnalytics.RecognizePiiEntitiesResult RecognizePiiEntitiesResult(string id, Azure.AI.TextAnalytics.TextDocumentStatistics statistics, Azure.AI.TextAnalytics.PiiEntityCollection entities) { throw null; } public static Azure.AI.TextAnalytics.RecognizePiiEntitiesResultCollection RecognizePiiEntitiesResultCollection(System.Collections.Generic.IEnumerable list, Azure.AI.TextAnalytics.TextDocumentBatchStatistics statistics, string modelVersion) { throw null; } @@ -1077,8 +1084,8 @@ public static partial class TextAnalyticsModelFactory public static Azure.AI.TextAnalytics.SentenceSentiment SentenceSentiment(Azure.AI.TextAnalytics.TextSentiment sentiment, string text, double positiveScore, double neutralScore, double negativeScore) { throw null; } public static Azure.AI.TextAnalytics.SentenceSentiment SentenceSentiment(Azure.AI.TextAnalytics.TextSentiment sentiment, string text, double positiveScore, double neutralScore, double negativeScore, int offset, int length, System.Collections.Generic.IEnumerable opinions) { throw null; } public static Azure.AI.TextAnalytics.SentimentConfidenceScores SentimentConfidenceScores(double positiveScore, double neutralScore, double negativeScore) { throw null; } - public static Azure.AI.TextAnalytics.SingleCategoryClassifyActionResult SingleCategoryClassifyActionResult(Azure.AI.TextAnalytics.SingleCategoryClassifyResultCollection result, System.DateTimeOffset completedOn) { throw null; } - public static Azure.AI.TextAnalytics.SingleCategoryClassifyActionResult SingleCategoryClassifyActionResult(System.DateTimeOffset completedOn, string code, string message) { throw null; } + public static Azure.AI.TextAnalytics.SingleCategoryClassifyActionResult SingleCategoryClassifyActionResult(Azure.AI.TextAnalytics.SingleCategoryClassifyResultCollection result, string actionName, System.DateTimeOffset completedOn) { throw null; } + public static Azure.AI.TextAnalytics.SingleCategoryClassifyActionResult SingleCategoryClassifyActionResult(string actionName, System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.SingleCategoryClassifyResult SingleCategoryClassifyResult(string id, Azure.AI.TextAnalytics.TextAnalyticsError error) { throw null; } public static Azure.AI.TextAnalytics.SingleCategoryClassifyResult SingleCategoryClassifyResult(string id, Azure.AI.TextAnalytics.TextDocumentStatistics statistics, Azure.AI.TextAnalytics.ClassificationCategory classification, System.Collections.Generic.IEnumerable warnings = null) { throw null; } public static Azure.AI.TextAnalytics.SingleCategoryClassifyResultCollection SingleCategoryClassifyResultCollection(System.Collections.Generic.IEnumerable classificationResultList, Azure.AI.TextAnalytics.TextDocumentBatchStatistics statistics, string projectName, string deploymentName) { throw null; } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeSentimentAction.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeSentimentAction.cs index 3a2cc1a8ec0f..0788e5c43044 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeSentimentAction.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeSentimentAction.cs @@ -65,5 +65,10 @@ public AnalyzeSentimentAction(AnalyzeSentimentOptions options) /// This property only has value for and up. /// public bool? IncludeOpinionMining { get; set; } + + /// + /// Gets or sets a name for this action. If not provided, the service will generate one. + /// + public string ActionName { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeSentimentActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeSentimentActionResult.cs index 5bf5a499e60f..d1f73cedbf39 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeSentimentActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeSentimentActionResult.cs @@ -16,8 +16,8 @@ public class AnalyzeSentimentActionResult : TextAnalyticsActionResult /// /// Successful action. /// - internal AnalyzeSentimentActionResult(AnalyzeSentimentResultCollection result, DateTimeOffset completedOn) - : base(completedOn) + internal AnalyzeSentimentActionResult(AnalyzeSentimentResultCollection result, string actionName, DateTimeOffset completedOn) + : base(completedOn, actionName) { _documentsResults = result; } @@ -25,8 +25,8 @@ internal AnalyzeSentimentActionResult(AnalyzeSentimentResultCollection result, D /// /// Action with an error. /// - internal AnalyzeSentimentActionResult(DateTimeOffset completedOn, TextAnalyticsErrorInternal error) - : base(completedOn, error) { } + internal AnalyzeSentimentActionResult(DateTimeOffset completedOn, string actionName, TextAnalyticsErrorInternal error) + : base(completedOn, actionName, error) { } /// /// Gets the result of the execution of an per each input document. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractKeyPhrasesAction.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractKeyPhrasesAction.cs index 29f149041206..394ec36596fe 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractKeyPhrasesAction.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractKeyPhrasesAction.cs @@ -52,5 +52,10 @@ public ExtractKeyPhrasesAction(TextAnalyticsRequestOptions options) /// This property only applies for and up. /// public bool? DisableServiceLogs { get; set; } + + /// + /// Gets or sets a name for this action. If not provided, the service will generate one. + /// + public string ActionName { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractKeyPhrasesActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractKeyPhrasesActionResult.cs index 1f019fb3ca20..1c0bad5e9391 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractKeyPhrasesActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractKeyPhrasesActionResult.cs @@ -16,8 +16,8 @@ public class ExtractKeyPhrasesActionResult : TextAnalyticsActionResult /// /// Successful action. /// - internal ExtractKeyPhrasesActionResult(ExtractKeyPhrasesResultCollection result, DateTimeOffset completedOn) - : base(completedOn) + internal ExtractKeyPhrasesActionResult(ExtractKeyPhrasesResultCollection result, string actionName, DateTimeOffset completedOn) + : base(completedOn, actionName) { _documentsResults = result; } @@ -25,8 +25,8 @@ internal ExtractKeyPhrasesActionResult(ExtractKeyPhrasesResultCollection result, /// /// Action with an error. /// - internal ExtractKeyPhrasesActionResult(DateTimeOffset completedOn, TextAnalyticsErrorInternal error) - : base(completedOn, error) { } + internal ExtractKeyPhrasesActionResult(DateTimeOffset completedOn, string actionName, TextAnalyticsErrorInternal error) + : base(completedOn, actionName, error) { } /// /// Gets the result of the execution of an per each input document. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractSummaryAction.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractSummaryAction.cs index a7389a7ae501..1cf1e49b51e1 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractSummaryAction.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractSummaryAction.cs @@ -53,5 +53,10 @@ public ExtractSummaryAction() /// to the input document, as decided by the service. Defaults to . /// public SummarySentencesOrder? OrderBy { get; set; } + + /// + /// Gets or sets a name for this action. If not provided, the service will generate one. + /// + public string ActionName { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractSummaryActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractSummaryActionResult.cs index ef84b5118c9c..8d52dc56f066 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractSummaryActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractSummaryActionResult.cs @@ -16,8 +16,8 @@ public class ExtractSummaryActionResult : TextAnalyticsActionResult /// /// Successful action. /// - internal ExtractSummaryActionResult(ExtractSummaryResultCollection result, DateTimeOffset completedOn) - : base(completedOn) + internal ExtractSummaryActionResult(ExtractSummaryResultCollection result, string actionName, DateTimeOffset completedOn) + : base(completedOn, actionName) { _documentsResults = result; } @@ -25,8 +25,8 @@ internal ExtractSummaryActionResult(ExtractSummaryResultCollection result, DateT /// /// Action with an error. /// - internal ExtractSummaryActionResult(DateTimeOffset completedOn, TextAnalyticsErrorInternal error) - : base(completedOn, error) { } + internal ExtractSummaryActionResult(DateTimeOffset completedOn, string actionName, TextAnalyticsErrorInternal error) + : base(completedOn, actionName, error) { } /// /// Gets the result of the execution of an per each input document. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/MultiCategoryClassifyAction.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/MultiCategoryClassifyAction.cs index 5a66ac500e7b..a4836ffdfba8 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/MultiCategoryClassifyAction.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/MultiCategoryClassifyAction.cs @@ -44,5 +44,10 @@ public MultiCategoryClassifyAction(string projectName, string deploymentName) /// /// public bool? DisableServiceLogs { get; set; } + + /// + /// Gets or sets a name for this action. If not provided, the service will generate one. + /// + public string ActionName { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/MultiCategoryClassifyActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/MultiCategoryClassifyActionResult.cs index 915b16652d3b..c44153e5ea87 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/MultiCategoryClassifyActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/MultiCategoryClassifyActionResult.cs @@ -16,8 +16,8 @@ public class MultiCategoryClassifyActionResult : TextAnalyticsActionResult /// /// Successful action. /// - internal MultiCategoryClassifyActionResult(MultiCategoryClassifyResultCollection result, DateTimeOffset completedOn) - : base(completedOn) + internal MultiCategoryClassifyActionResult(MultiCategoryClassifyResultCollection result, string actionName, DateTimeOffset completedOn) + : base(completedOn, actionName ) { _documentsResults = result; } @@ -25,8 +25,8 @@ internal MultiCategoryClassifyActionResult(MultiCategoryClassifyResultCollection /// /// Action with an error. /// - internal MultiCategoryClassifyActionResult(DateTimeOffset completedOn, TextAnalyticsErrorInternal error) - : base(completedOn, error) { } + internal MultiCategoryClassifyActionResult(DateTimeOffset completedOn, string actionName, TextAnalyticsErrorInternal error) + : base(completedOn, actionName, error) { } /// /// Gets the result of the execution of a per each input document. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeEntitiesAction.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeEntitiesAction.cs index c469ea894df5..1978a192db84 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeEntitiesAction.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeEntitiesAction.cs @@ -52,5 +52,10 @@ public RecognizeEntitiesAction(TextAnalyticsRequestOptions options) /// This property only applies for and up. /// public bool? DisableServiceLogs { get; set; } + + /// + /// Gets or sets a name for this action. If not provided, the service will generate one. + /// + public string ActionName { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeEntitiesActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeEntitiesActionResult.cs index 00f1b3680add..86393681e9d1 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeEntitiesActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeEntitiesActionResult.cs @@ -16,8 +16,8 @@ public class RecognizeEntitiesActionResult : TextAnalyticsActionResult /// /// Successful action. /// - internal RecognizeEntitiesActionResult(RecognizeEntitiesResultCollection result, DateTimeOffset completedOn) - : base(completedOn) + internal RecognizeEntitiesActionResult(RecognizeEntitiesResultCollection result, string actionName, DateTimeOffset completedOn) + : base(completedOn, actionName) { _documentsResults = result; } @@ -25,8 +25,8 @@ internal RecognizeEntitiesActionResult(RecognizeEntitiesResultCollection result, /// /// Action with an error. /// - internal RecognizeEntitiesActionResult(DateTimeOffset completedOn, TextAnalyticsErrorInternal error) - : base(completedOn, error) { } + internal RecognizeEntitiesActionResult(DateTimeOffset completedOn, string actionName, TextAnalyticsErrorInternal error) + : base(completedOn, actionName, error) { } /// /// Gets the result of the execution of a per each input document. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeLinkedEntitiesAction.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeLinkedEntitiesAction.cs index 1b7a7b4e10ba..66f4c575a08a 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeLinkedEntitiesAction.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeLinkedEntitiesAction.cs @@ -52,5 +52,10 @@ public RecognizeLinkedEntitiesAction(TextAnalyticsRequestOptions options) /// This property only applies for and up. /// public bool? DisableServiceLogs { get; set; } + + /// + /// Gets or sets a name for this action. If not provided, the service will generate one. + /// + public string ActionName { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeLinkedEntitiesActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeLinkedEntitiesActionResult.cs index 344cedb11a47..3a7521198db5 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeLinkedEntitiesActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeLinkedEntitiesActionResult.cs @@ -16,8 +16,8 @@ public class RecognizeLinkedEntitiesActionResult : TextAnalyticsActionResult /// /// Successful action. /// - internal RecognizeLinkedEntitiesActionResult(RecognizeLinkedEntitiesResultCollection result, DateTimeOffset completedOn) - : base(completedOn) + internal RecognizeLinkedEntitiesActionResult(RecognizeLinkedEntitiesResultCollection result, string actionName, DateTimeOffset completedOn) + : base(completedOn, actionName) { _documentsResults = result; } @@ -25,8 +25,8 @@ internal RecognizeLinkedEntitiesActionResult(RecognizeLinkedEntitiesResultCollec /// /// Action with an error. /// - internal RecognizeLinkedEntitiesActionResult(DateTimeOffset completedOn, TextAnalyticsErrorInternal error) - : base(completedOn, error) { } + internal RecognizeLinkedEntitiesActionResult(DateTimeOffset completedOn, string actionName, TextAnalyticsErrorInternal error) + : base(completedOn, actionName, error) { } /// /// Gets the result of the execution of a per each input document. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizePiiEntitiesAction.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizePiiEntitiesAction.cs index 41216579e55d..839045d7f1f5 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizePiiEntitiesAction.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizePiiEntitiesAction.cs @@ -72,5 +72,10 @@ public RecognizePiiEntitiesAction(RecognizePiiEntitiesOptions options) /// Filters the response entities to entities that match the specified. /// public IList CategoriesFilter { get; internal set; } = new List(); + + /// + /// Gets or sets a name for this action. If not provided, the service will generate one. + /// + public string ActionName { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizePiiEntitiesActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizePiiEntitiesActionResult.cs index 816adb96efe8..57fd1689fd81 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizePiiEntitiesActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizePiiEntitiesActionResult.cs @@ -16,8 +16,8 @@ public class RecognizePiiEntitiesActionResult : TextAnalyticsActionResult /// /// Successful action. /// - internal RecognizePiiEntitiesActionResult(RecognizePiiEntitiesResultCollection result, DateTimeOffset completedOn) - : base(completedOn) + internal RecognizePiiEntitiesActionResult(RecognizePiiEntitiesResultCollection result, string actionName, DateTimeOffset completedOn) + : base(completedOn, actionName) { _documentsResults = result; } @@ -25,8 +25,8 @@ internal RecognizePiiEntitiesActionResult(RecognizePiiEntitiesResultCollection r /// /// Action with an error. /// - internal RecognizePiiEntitiesActionResult(DateTimeOffset completedOn, TextAnalyticsErrorInternal error) - : base(completedOn, error) { } + internal RecognizePiiEntitiesActionResult(DateTimeOffset completedOn, string actionName, TextAnalyticsErrorInternal error) + : base(completedOn, actionName, error) { } /// /// Gets the result of the execution of a per each input document. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/SingleCategoryClassifyAction.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/SingleCategoryClassifyAction.cs index 268b858e686d..60f25a379fed 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/SingleCategoryClassifyAction.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/SingleCategoryClassifyAction.cs @@ -46,5 +46,10 @@ public SingleCategoryClassifyAction(string projectName, string deploymentName) /// /// public bool? DisableServiceLogs { get; set; } + + /// + /// Gets or sets a name for this action. If not provided, the service will generate one. + /// + public string ActionName { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/SingleCategoryClassifyActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/SingleCategoryClassifyActionResult.cs index ccce17ef8651..7f5dc933b643 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/SingleCategoryClassifyActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/SingleCategoryClassifyActionResult.cs @@ -16,8 +16,8 @@ public class SingleCategoryClassifyActionResult : TextAnalyticsActionResult /// /// Successful action. /// - internal SingleCategoryClassifyActionResult(SingleCategoryClassifyResultCollection result, DateTimeOffset completedOn) - : base(completedOn) + internal SingleCategoryClassifyActionResult(SingleCategoryClassifyResultCollection result, string actionName, DateTimeOffset completedOn) + : base(completedOn, actionName) { _documentsResults = result; } @@ -25,8 +25,8 @@ internal SingleCategoryClassifyActionResult(SingleCategoryClassifyResultCollecti /// /// Action with an error. /// - internal SingleCategoryClassifyActionResult(DateTimeOffset completedOn, TextAnalyticsErrorInternal error) - : base(completedOn, error) { } + internal SingleCategoryClassifyActionResult(DateTimeOffset completedOn, string actionName, TextAnalyticsErrorInternal error) + : base(completedOn, actionName, error) { } /// /// Gets the result of the execution of a per each input document. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActionResult.cs index 416d3105d491..754ee3fe6790 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActionResult.cs @@ -11,15 +11,17 @@ namespace Azure.AI.TextAnalytics /// public class TextAnalyticsActionResult { - internal TextAnalyticsActionResult (DateTimeOffset completedOn, TextAnalyticsErrorInternal error) + internal TextAnalyticsActionResult (DateTimeOffset completedOn, string actionName, TextAnalyticsErrorInternal error) { CompletedOn = completedOn; + ActionName = actionName; Error = error != null ? Transforms.ConvertToError(error) : default; } - internal TextAnalyticsActionResult(DateTimeOffset completedOn) + internal TextAnalyticsActionResult(DateTimeOffset completedOn, string actionName) { CompletedOn = completedOn; + ActionName = actionName; } /// @@ -36,5 +38,10 @@ internal TextAnalyticsActionResult(DateTimeOffset completedOn) /// Indicates that the document was not successfully processed and an error was returned for this document. /// public bool HasError => Error.ErrorCode != default; + + /// + /// Gets the name for this action. + /// + public string ActionName { get; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs index 83e4926bab7a..4cce342cb660 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs @@ -822,56 +822,64 @@ public static AnalyzeActionsResult AnalyzeActionsResult( /// Initializes a new instance of for mocking purposes. /// /// Sets the property. + /// Sets the property. /// Sets the property. /// A new instance of for mocking purposes. public static ExtractKeyPhrasesActionResult ExtractKeyPhrasesActionResult( ExtractKeyPhrasesResultCollection result, + string actionName, DateTimeOffset completedOn) { - return new ExtractKeyPhrasesActionResult(result, completedOn); + return new ExtractKeyPhrasesActionResult(result, actionName, completedOn); } /// /// Initializes a new instance of for mocking purposes. /// + /// Sets the property. /// Sets the property. /// Sets the property. /// Sets the property. /// A new instance of for mocking purposes. public static ExtractKeyPhrasesActionResult ExtractKeyPhrasesActionResult( + string actionName, DateTimeOffset completedOn, string code, string message) { - return new ExtractKeyPhrasesActionResult(completedOn, new TextAnalyticsErrorInternal(code, message)); + return new ExtractKeyPhrasesActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); } /// /// Initializes a new instance of for mocking purposes. /// /// Sets the property. + /// Sets the property. /// Sets the property. /// A new instance of for mocking purposes. public static ExtractSummaryActionResult ExtractSummaryActionResult( ExtractSummaryResultCollection result, + string actionName, DateTimeOffset completedOn) { - return new ExtractSummaryActionResult(result, completedOn); + return new ExtractSummaryActionResult(result, actionName, completedOn); } /// /// Initializes a new instance of for mocking purposes. /// + /// Sets the property. /// Sets the property. /// Sets the property. /// Sets the property. /// A new instance of for mocking purposes. public static ExtractSummaryActionResult ExtractSummaryActionResult( + string actionName, DateTimeOffset completedOn, string code, string message) { - return new ExtractSummaryActionResult(completedOn, new TextAnalyticsErrorInternal(code, message)); + return new ExtractSummaryActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); } /// @@ -906,168 +914,192 @@ public static RecognizeCustomEntitiesActionResult RecognizeCustomEntitiesActionR /// Initializes a new instance of for mocking purposes. /// /// Sets the property. + /// Sets the property. /// Sets the property. /// A new instance of for mocking purposes. public static MultiCategoryClassifyActionResult MultiCategoryClassifyActionResult( MultiCategoryClassifyResultCollection result, + string actionName, DateTimeOffset completedOn) { - return new MultiCategoryClassifyActionResult(result, completedOn); + return new MultiCategoryClassifyActionResult(result, actionName, completedOn); } /// /// Initializes a new instance of for mocking purposes. /// + /// Sets the property. /// Sets the property. /// Sets the property. /// Sets the property. /// A new instance of for mocking purposes. public static MultiCategoryClassifyActionResult MultiCategoryClassifyActionResult( + string actionName, DateTimeOffset completedOn, string code, string message) { - return new MultiCategoryClassifyActionResult(completedOn, new TextAnalyticsErrorInternal(code, message)); + return new MultiCategoryClassifyActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); } /// /// Initializes a new instance of for mocking purposes. /// /// Sets the property. + /// Sets the property. /// Sets the property. /// A new instance of for mocking purposes. public static SingleCategoryClassifyActionResult SingleCategoryClassifyActionResult( SingleCategoryClassifyResultCollection result, + string actionName, DateTimeOffset completedOn) { - return new SingleCategoryClassifyActionResult(result, completedOn); + return new SingleCategoryClassifyActionResult(result, actionName, completedOn); } /// /// Initializes a new instance of for mocking purposes. /// + /// Sets the property. /// Sets the property. /// Sets the property. /// Sets the property. /// A new instance of for mocking purposes. public static SingleCategoryClassifyActionResult SingleCategoryClassifyActionResult( + string actionName, DateTimeOffset completedOn, string code, string message) { - return new SingleCategoryClassifyActionResult(completedOn, new TextAnalyticsErrorInternal(code, message)); + return new SingleCategoryClassifyActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); } /// /// Initializes a new instance of for mocking purposes. /// /// Sets the property. + /// Sets the property. /// Sets the property. /// A new instance of for mocking purposes. public static AnalyzeSentimentActionResult AnalyzeSentimentActionResult( AnalyzeSentimentResultCollection result, + string actionName, DateTimeOffset completedOn) { - return new AnalyzeSentimentActionResult(result, completedOn); + return new AnalyzeSentimentActionResult(result, actionName, completedOn); } /// /// Initializes a new instance of for mocking purposes. /// + /// Sets the property. /// Sets the property. /// Sets the property. /// Sets the property. /// A new instance of for mocking purposes. public static AnalyzeSentimentActionResult AnalyzeSentimentActionResult( + string actionName, DateTimeOffset completedOn, string code, string message) { - return new AnalyzeSentimentActionResult(completedOn, new TextAnalyticsErrorInternal(code, message)); + return new AnalyzeSentimentActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); } /// /// Initializes a new instance of for mocking purposes. /// /// Sets the property. + /// Sets the property. /// Sets the property. /// A new instance of for mocking purposes. public static RecognizeLinkedEntitiesActionResult RecognizeLinkedEntitiesActionResult( RecognizeLinkedEntitiesResultCollection result, + string actionName, DateTimeOffset completedOn) { - return new RecognizeLinkedEntitiesActionResult(result, completedOn); + return new RecognizeLinkedEntitiesActionResult(result, actionName, completedOn); } /// /// Initializes a new instance of for mocking purposes. /// + /// Sets the property. /// Sets the property. /// Sets the property. /// Sets the property. /// A new instance of for mocking purposes. public static RecognizeLinkedEntitiesActionResult RecognizeLinkedEntitiesActionResult( + string actionName, DateTimeOffset completedOn, string code, string message) { - return new RecognizeLinkedEntitiesActionResult(completedOn, new TextAnalyticsErrorInternal(code, message)); + return new RecognizeLinkedEntitiesActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); } /// /// Initializes a new instance of for mocking purposes. /// /// Sets the property. + /// Sets the property. /// Sets the property. /// A new instance of for mocking purposes. public static RecognizeEntitiesActionResult RecognizeEntitiesActionResult( RecognizeEntitiesResultCollection result, + string actionName, DateTimeOffset completedOn) { - return new RecognizeEntitiesActionResult(result, completedOn); + return new RecognizeEntitiesActionResult(result, actionName, completedOn); } /// /// Initializes a new instance of for mocking purposes. /// + /// Sets the property. /// Sets the property. /// Sets the property. /// Sets the property. /// A new instance of for mocking purposes. public static RecognizeEntitiesActionResult RecognizeEntitiesActionResult( + string actionName, DateTimeOffset completedOn, string code, string message) { - return new RecognizeEntitiesActionResult(completedOn, new TextAnalyticsErrorInternal(code, message)); + return new RecognizeEntitiesActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); } - /// + /// ` /// Initializes a new instance of for mocking purposes. /// /// Sets the property. + /// Sets the property. /// Sets the property. /// A new instance of for mocking purposes. public static RecognizePiiEntitiesActionResult RecognizePiiEntitiesActionResult( RecognizePiiEntitiesResultCollection result, + string actionName, DateTimeOffset completedOn) { - return new RecognizePiiEntitiesActionResult(result, completedOn); + return new RecognizePiiEntitiesActionResult(result, actionName, completedOn); } /// /// Initializes a new instance of for mocking purposes. /// + /// Sets the property. /// Sets the property. /// Sets the property. /// Sets the property. /// A new instance of for mocking purposes. public static RecognizePiiEntitiesActionResult RecognizePiiEntitiesActionResult( + string actionName, DateTimeOffset completedOn, string code, string message) { - return new RecognizePiiEntitiesActionResult(completedOn, new TextAnalyticsErrorInternal(code, message)); + return new RecognizePiiEntitiesActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); } #endregion Action Result Models diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs index 682e9fc5f745..5f854408e111 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs @@ -449,7 +449,8 @@ internal static PiiTask ConvertToPiiTask(RecognizePiiEntitiesAction action) return new PiiTask() { - Parameters = parameters + Parameters = parameters, + TaskName = action.ActionName }; } @@ -462,7 +463,8 @@ internal static EntityLinkingTask ConvertToLinkedEntitiesTask(RecognizeLinkedEnt ModelVersion = action.ModelVersion, StringIndexType = Constants.DefaultStringIndexType, LoggingOptOut = action.DisableServiceLogs - } + }, + TaskName = action.ActionName }; } @@ -475,7 +477,8 @@ internal static EntitiesTask ConvertToEntitiesTask(RecognizeEntitiesAction actio ModelVersion = action.ModelVersion, StringIndexType = Constants.DefaultStringIndexType, LoggingOptOut = action.DisableServiceLogs - } + }, + TaskName = action.ActionName }; } @@ -487,7 +490,8 @@ internal static KeyPhrasesTask ConvertToKeyPhrasesTask(ExtractKeyPhrasesAction a { ModelVersion = action.ModelVersion, LoggingOptOut = action.DisableServiceLogs - } + }, + TaskName = action.ActionName }; } @@ -501,7 +505,8 @@ internal static SentimentAnalysisTask ConvertToSentimentAnalysisTask(AnalyzeSent StringIndexType = Constants.DefaultStringIndexType, LoggingOptOut = action.DisableServiceLogs, OpinionMining = action.IncludeOpinionMining - } + }, + TaskName = action.ActionName }; } @@ -516,7 +521,8 @@ internal static ExtractiveSummarizationTask ConvertToExtractiveSummarizationTask LoggingOptOut = action.DisableServiceLogs, SentenceCount = action.MaxSentenceCount, SortBy = action.OrderBy - } + }, + TaskName = action.ActionName }; } @@ -538,7 +544,8 @@ internal static CustomSingleClassificationTask ConvertToCustomSingleClassificati Parameters = new CustomSingleClassificationTaskParameters(action.ProjectName, action.DeploymentName) { LoggingOptOut = action.DisableServiceLogs, - } + }, + TaskName = action.ActionName }; } @@ -549,7 +556,8 @@ internal static CustomMultiClassificationTask ConvertToCustomMultiClassification Parameters = new CustomMultiClassificationTaskParameters(action.ProjectName, action.DeploymentName) { LoggingOptOut = action.DisableServiceLogs, - } + }, + TaskName = action.ActionName }; } @@ -768,11 +776,11 @@ private static IReadOnlyCollection ConvertToM if (taskError != null) { - collection.Add(new MultiCategoryClassifyActionResult(task.LastUpdateDateTime, taskError)); + collection.Add(new MultiCategoryClassifyActionResult(task.LastUpdateDateTime, task.TaskName, taskError)); } else { - collection.Add(new MultiCategoryClassifyActionResult(ConvertToMultiCategoryClassifyResultCollection(task.Results, idToIndexMap), task.LastUpdateDateTime)); + collection.Add(new MultiCategoryClassifyActionResult(ConvertToMultiCategoryClassifyResultCollection(task.Results, idToIndexMap), task.TaskName, task.LastUpdateDateTime)); } index++; } @@ -790,11 +798,11 @@ private static IReadOnlyCollection ConvertTo if (taskError != null) { - collection.Add(new SingleCategoryClassifyActionResult(task.LastUpdateDateTime, taskError)); + collection.Add(new SingleCategoryClassifyActionResult(task.LastUpdateDateTime, task.TaskName, taskError)); } else { - collection.Add(new SingleCategoryClassifyActionResult(ConvertToSingleCategoryClassifyResultCollection(task.Results, idToIndexMap), task.LastUpdateDateTime)); + collection.Add(new SingleCategoryClassifyActionResult(ConvertToSingleCategoryClassifyResultCollection(task.Results, idToIndexMap), task.TaskName, task.LastUpdateDateTime)); } index++; } @@ -812,11 +820,11 @@ private static IReadOnlyCollection ConvertToAnalyz if (taskError != null) { - collection.Add(new AnalyzeSentimentActionResult(task.LastUpdateDateTime, taskError)); + collection.Add(new AnalyzeSentimentActionResult(task.LastUpdateDateTime, task.TaskName, taskError)); } else { - collection.Add(new AnalyzeSentimentActionResult(ConvertToAnalyzeSentimentResultCollection(task.Results, idToIndexMap), task.LastUpdateDateTime)); + collection.Add(new AnalyzeSentimentActionResult(ConvertToAnalyzeSentimentResultCollection(task.Results, idToIndexMap), task.TaskName, task.LastUpdateDateTime)); } index++; } @@ -834,11 +842,11 @@ private static IReadOnlyCollection ConvertT if (taskError != null) { - collection.Add(new RecognizeLinkedEntitiesActionResult(task.LastUpdateDateTime, taskError)); + collection.Add(new RecognizeLinkedEntitiesActionResult(task.LastUpdateDateTime, task.TaskName, taskError)); } else { - collection.Add(new RecognizeLinkedEntitiesActionResult(ConvertToRecognizeLinkedEntitiesResultCollection(task.Results, idToIndexMap), task.LastUpdateDateTime)); + collection.Add(new RecognizeLinkedEntitiesActionResult(ConvertToRecognizeLinkedEntitiesResultCollection(task.Results, idToIndexMap), task.TaskName, task.LastUpdateDateTime)); } index++; } @@ -856,11 +864,11 @@ private static IReadOnlyCollection ConvertToExtra if (taskError != null) { - collection.Add(new ExtractKeyPhrasesActionResult(task.LastUpdateDateTime, taskError)); + collection.Add(new ExtractKeyPhrasesActionResult(task.LastUpdateDateTime, task.TaskName, taskError)); } else { - collection.Add(new ExtractKeyPhrasesActionResult(ConvertToExtractKeyPhrasesResultCollection(task.Results, idToIndexMap), task.LastUpdateDateTime)); + collection.Add(new ExtractKeyPhrasesActionResult(ConvertToExtractKeyPhrasesResultCollection(task.Results, idToIndexMap), task.TaskName, task.LastUpdateDateTime)); } index++; } @@ -878,11 +886,11 @@ private static IReadOnlyCollection ConvertToRe if (taskError != null) { - collection.Add(new RecognizePiiEntitiesActionResult(task.LastUpdateDateTime, taskError)); + collection.Add(new RecognizePiiEntitiesActionResult(task.LastUpdateDateTime, task.TaskName, taskError)); } else { - collection.Add(new RecognizePiiEntitiesActionResult(ConvertToRecognizePiiEntitiesResultCollection(task.Results, idToIndexMap), task.LastUpdateDateTime)); + collection.Add(new RecognizePiiEntitiesActionResult(ConvertToRecognizePiiEntitiesResultCollection(task.Results, idToIndexMap), task.TaskName, task.LastUpdateDateTime)); } index++; } @@ -900,11 +908,11 @@ private static IReadOnlyCollection ConvertToRecog if (taskError != null) { - collection.Add(new RecognizeEntitiesActionResult(task.LastUpdateDateTime, taskError)); + collection.Add(new RecognizeEntitiesActionResult(task.LastUpdateDateTime, task.TaskName, taskError)); } else { - collection.Add(new RecognizeEntitiesActionResult(ConvertToRecognizeEntitiesResultCollection(task.Results, idToIndexMap), task.LastUpdateDateTime)); + collection.Add(new RecognizeEntitiesActionResult(ConvertToRecognizeEntitiesResultCollection(task.Results, idToIndexMap), task.TaskName, task.LastUpdateDateTime)); } index++; } @@ -944,11 +952,11 @@ private static IReadOnlyCollection ConvertToExtractS if (taskError != null) { - collection.Add(new ExtractSummaryActionResult(task.LastUpdateDateTime, taskError)); + collection.Add(new ExtractSummaryActionResult(task.LastUpdateDateTime, task.TaskName, taskError)); } else { - collection.Add(new ExtractSummaryActionResult(ConvertToExtractSummaryResultCollection(task.Results, idToIndexMap), task.LastUpdateDateTime)); + collection.Add(new ExtractSummaryActionResult(ConvertToExtractSummaryResultCollection(task.Results, idToIndexMap), task.TaskName, task.LastUpdateDateTime)); } index++; } From 5ca39396accdc1f715b72135d20b3c94c40316e5 Mon Sep 17 00:00:00 2001 From: Salah Mostafa Date: Mon, 11 Oct 2021 11:20:58 +0200 Subject: [PATCH 02/16] compiled with ignoring compat --- .../src/ApiCompatBaseline.txt | 18 ++++++--- .../tests/TextAnalyticsModelFactoryTests.cs | 38 ++++++++++--------- 2 files changed, 32 insertions(+), 24 deletions(-) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ApiCompatBaseline.txt b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ApiCompatBaseline.txt index 972a0b750528..54b5f9d0c492 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ApiCompatBaseline.txt +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ApiCompatBaseline.txt @@ -1,6 +1,12 @@ -# Baselining these until the next GA. These are not really a compat issue we need to worry about because the properties were already readonly but we made the entire type readonly now which is where the attributes came from -CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'Azure.AI.TextAnalytics.TextAnalyticsError.ErrorCode.get()' in the contract but not the implementation. -CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'Azure.AI.TextAnalytics.TextAnalyticsError.Message.get()' in the contract but not the implementation. -CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'Azure.AI.TextAnalytics.TextAnalyticsError.Target.get()' in the contract but not the implementation. -CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'Azure.AI.TextAnalytics.TextAnalyticsWarning.Message.get()' in the contract but not the implementation. -CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'Azure.AI.TextAnalytics.TextAnalyticsWarning.WarningCode.get()' in the contract but not the implementation. +Compat issues with assembly Azure.AI.TextAnalytics: +MembersMustExist : Member 'public Azure.AI.TextAnalytics.AnalyzeSentimentActionResult Azure.AI.TextAnalytics.TextAnalyticsModelFactory.AnalyzeSentimentActionResult(Azure.AI.TextAnalytics.AnalyzeSentimentResultCollection, System.DateTimeOffset)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'public Azure.AI.TextAnalytics.AnalyzeSentimentActionResult Azure.AI.TextAnalytics.TextAnalyticsModelFactory.AnalyzeSentimentActionResult(System.DateTimeOffset, System.String, System.String)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'public Azure.AI.TextAnalytics.ExtractKeyPhrasesActionResult Azure.AI.TextAnalytics.TextAnalyticsModelFactory.ExtractKeyPhrasesActionResult(Azure.AI.TextAnalytics.ExtractKeyPhrasesResultCollection, System.DateTimeOffset)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'public Azure.AI.TextAnalytics.ExtractKeyPhrasesActionResult Azure.AI.TextAnalytics.TextAnalyticsModelFactory.ExtractKeyPhrasesActionResult(System.DateTimeOffset, System.String, System.String)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'public Azure.AI.TextAnalytics.RecognizeEntitiesActionResult Azure.AI.TextAnalytics.TextAnalyticsModelFactory.RecognizeEntitiesActionResult(Azure.AI.TextAnalytics.RecognizeEntitiesResultCollection, System.DateTimeOffset)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'public Azure.AI.TextAnalytics.RecognizeEntitiesActionResult Azure.AI.TextAnalytics.TextAnalyticsModelFactory.RecognizeEntitiesActionResult(System.DateTimeOffset, System.String, System.String)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'public Azure.AI.TextAnalytics.RecognizeLinkedEntitiesActionResult Azure.AI.TextAnalytics.TextAnalyticsModelFactory.RecognizeLinkedEntitiesActionResult(Azure.AI.TextAnalytics.RecognizeLinkedEntitiesResultCollection, System.DateTimeOffset)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'public Azure.AI.TextAnalytics.RecognizeLinkedEntitiesActionResult Azure.AI.TextAnalytics.TextAnalyticsModelFactory.RecognizeLinkedEntitiesActionResult(System.DateTimeOffset, System.String, System.String)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'public Azure.AI.TextAnalytics.RecognizePiiEntitiesActionResult Azure.AI.TextAnalytics.TextAnalyticsModelFactory.RecognizePiiEntitiesActionResult(Azure.AI.TextAnalytics.RecognizePiiEntitiesResultCollection, System.DateTimeOffset)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'public Azure.AI.TextAnalytics.RecognizePiiEntitiesActionResult Azure.AI.TextAnalytics.TextAnalyticsModelFactory.RecognizePiiEntitiesActionResult(System.DateTimeOffset, System.String, System.String)' does not exist in the implementation but it does exist in the contract. +Total Issues: 10 diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsModelFactoryTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsModelFactoryTests.cs index f3886512eaae..ef608b6db28e 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsModelFactoryTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsModelFactoryTests.cs @@ -108,32 +108,32 @@ public void AnalyzeActionsResult() { var extractKeyPhrasesActionResults = new List() { - TextAnalyticsModelFactory.ExtractKeyPhrasesActionResult(default, default), - TextAnalyticsModelFactory.ExtractKeyPhrasesActionResult(default, default) + TextAnalyticsModelFactory.ExtractKeyPhrasesActionResult(default, default, default), + TextAnalyticsModelFactory.ExtractKeyPhrasesActionResult(default, default, default) }; var recognizeEntitiesActionResults = new List() { - TextAnalyticsModelFactory.RecognizeEntitiesActionResult(default, default), - TextAnalyticsModelFactory.RecognizeEntitiesActionResult(default, default) + TextAnalyticsModelFactory.RecognizeEntitiesActionResult(default, default, default), + TextAnalyticsModelFactory.RecognizeEntitiesActionResult(default, default, default) }; var recognizePiiEntitiesActionResults = new List() { - TextAnalyticsModelFactory.RecognizePiiEntitiesActionResult(default, default), - TextAnalyticsModelFactory.RecognizePiiEntitiesActionResult(default, default) + TextAnalyticsModelFactory.RecognizePiiEntitiesActionResult(default, default, default), + TextAnalyticsModelFactory.RecognizePiiEntitiesActionResult(default, default, default) }; var recognizeLinkedEntitiesActionResults = new List() { - TextAnalyticsModelFactory.RecognizeLinkedEntitiesActionResult(default, default), - TextAnalyticsModelFactory.RecognizeLinkedEntitiesActionResult(default, default) + TextAnalyticsModelFactory.RecognizeLinkedEntitiesActionResult(default, default, default), + TextAnalyticsModelFactory.RecognizeLinkedEntitiesActionResult(default, default, default) }; var analyzeSentimentActionResults = new List() { - TextAnalyticsModelFactory.AnalyzeSentimentActionResult(default, default), - TextAnalyticsModelFactory.AnalyzeSentimentActionResult(default, default) + TextAnalyticsModelFactory.AnalyzeSentimentActionResult(default, default, default), + TextAnalyticsModelFactory.AnalyzeSentimentActionResult(default, default, default) }; var recognizeCustomEntitiesActionResults = new List() @@ -144,14 +144,14 @@ public void AnalyzeActionsResult() var singleCategoryClassifyActionResults = new List() { - TextAnalyticsModelFactory.SingleCategoryClassifyActionResult(default, default), - TextAnalyticsModelFactory.SingleCategoryClassifyActionResult(default, default) + TextAnalyticsModelFactory.SingleCategoryClassifyActionResult(default, default, default), + TextAnalyticsModelFactory.SingleCategoryClassifyActionResult(default, default, default) }; var multiCategoryClassifyActionResults = new List() { - TextAnalyticsModelFactory.MultiCategoryClassifyActionResult(default, default), - TextAnalyticsModelFactory.MultiCategoryClassifyActionResult(default, default) + TextAnalyticsModelFactory.MultiCategoryClassifyActionResult(default, default, default), + TextAnalyticsModelFactory.MultiCategoryClassifyActionResult(default, default, default) }; var actionsResult = TextAnalyticsModelFactory.AnalyzeActionsResult( @@ -170,8 +170,8 @@ public void AnalyzeActionsResult() var extractSummaryActionResults = new List() { - TextAnalyticsModelFactory.ExtractSummaryActionResult(default, default), - TextAnalyticsModelFactory.ExtractSummaryActionResult(default, default) + TextAnalyticsModelFactory.ExtractSummaryActionResult(default, default, default), + TextAnalyticsModelFactory.ExtractSummaryActionResult(default, default, default) }; actionsResult = TextAnalyticsModelFactory.AnalyzeActionsResult( @@ -201,8 +201,9 @@ public void ExtractSummaryActionResultWithoutError() { var result = TextAnalyticsModelFactory.ExtractSummaryResultCollection(new List(), default, default); var completedOn = DateTimeOffset.UtcNow; + string actionName = ""; - var actionResult = TextAnalyticsModelFactory.ExtractSummaryActionResult(result, completedOn); + var actionResult = TextAnalyticsModelFactory.ExtractSummaryActionResult(result, actionName, completedOn); Assert.AreEqual(result, actionResult.DocumentsResults); Assert.AreEqual(completedOn, actionResult.CompletedOn); @@ -217,8 +218,9 @@ public void ExtractSummaryActionResultWithError() var completedOn = DateTimeOffset.UtcNow; var code = "code"; var message = "message"; + string actionName = ""; - var actionResult = TextAnalyticsModelFactory.ExtractSummaryActionResult(completedOn, code, message); + var actionResult = TextAnalyticsModelFactory.ExtractSummaryActionResult(actionName, completedOn, code, message); Assert.Throws(() => _ = actionResult.DocumentsResults); Assert.AreEqual(completedOn, actionResult.CompletedOn); From 480d8bc80b3dd26e0d48391612f2e03a0aa37b11 Mon Sep 17 00:00:00 2001 From: Salah Mostafa Date: Mon, 11 Oct 2021 11:31:12 +0200 Subject: [PATCH 03/16] Removed mock tests --- .../tests/AnalyzeOperationMockTests.cs | 240 ------------------ 1 file changed, 240 deletions(-) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationMockTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationMockTests.cs index 83ac3e38371b..fc750d5784c2 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationMockTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationMockTests.cs @@ -136,36 +136,6 @@ public async Task AnalyzeOperationKeyPhrasesFromRequestOptionsFull() ValidateRequestOptions(contentString, true); } - [Test] - public void AnalyzeOperationKeyPhrasesWithTwoActions() - { - var mockResponse = new MockResponse(202); - mockResponse.AddHeader(new HttpHeader("Operation-Location", "something/jobs/2a96a91f-7edf-4931-a880-3fdee1d56f15")); - - var mockTransport = new MockTransport(new[] { mockResponse, mockResponse }); - var client = CreateTestClient(mockTransport); - - var documents = new List - { - "Elon Musk is the CEO of SpaceX and Tesla." - }; - - TextAnalyticsActions batchActions = new() - { - ExtractKeyPhrasesActions = new List() - { - new ExtractKeyPhrasesAction(), - new ExtractKeyPhrasesAction() - { - ModelVersion = "InvalidVersion" - } - }, - }; - - ArgumentException ex = Assert.ThrowsAsync(async () => await client.StartAnalyzeActionsAsync(documents, batchActions)); - Assert.AreEqual("Multiple of the same action is not currently supported.", ex.Message); - } - #endregion Key phrases #region entities @@ -266,36 +236,6 @@ public async Task AnalyzeOperationRecognizeEntitiesWithRequestOptionsFull() ValidateRequestOptions(contentString, true); } - [Test] - public void AnalyzeOperationRecognizeEntitiesWithTwoActions() - { - var mockResponse = new MockResponse(202); - mockResponse.AddHeader(new HttpHeader("Operation-Location", "something/jobs/2a96a91f-7edf-4931-a880-3fdee1d56f15")); - - var mockTransport = new MockTransport(new[] { mockResponse, mockResponse }); - var client = CreateTestClient(mockTransport); - - var documents = new List - { - "Elon Musk is the CEO of SpaceX and Tesla." - }; - - TextAnalyticsActions batchActions = new() - { - RecognizeEntitiesActions = new List() - { - new RecognizeEntitiesAction(), - new RecognizeEntitiesAction() - { - ModelVersion = "InvalidVersion" - } - }, - }; - - ArgumentException ex = Assert.ThrowsAsync(async () => await client.StartAnalyzeActionsAsync(documents, batchActions)); - Assert.AreEqual("Multiple of the same action is not currently supported.", ex.Message); - } - #endregion entities #region Custom Entities @@ -458,36 +398,6 @@ public async Task AnalyzeOperationRecognizeLinkedEntitiesWithRequestOptionsFull( ValidateRequestOptions(contentString, true); } - [Test] - public void AnalyzeOperationRecognizeLinkedEntitiesWithTwoActions() - { - var mockResponse = new MockResponse(202); - mockResponse.AddHeader(new HttpHeader("Operation-Location", "something/jobs/2a96a91f-7edf-4931-a880-3fdee1d56f15")); - - var mockTransport = new MockTransport(new[] { mockResponse, mockResponse }); - var client = CreateTestClient(mockTransport); - - var documents = new List - { - "Elon Musk is the CEO of SpaceX and Tesla." - }; - - TextAnalyticsActions batchActions = new() - { - RecognizeLinkedEntitiesActions = new List() - { - new RecognizeLinkedEntitiesAction(), - new RecognizeLinkedEntitiesAction() - { - ModelVersion = "InvalidVersion" - } - }, - }; - - ArgumentException ex = Assert.ThrowsAsync(async () => await client.StartAnalyzeActionsAsync(documents, batchActions)); - Assert.AreEqual("Multiple of the same action is not currently supported.", ex.Message); - } - #endregion linked entities #region Pii entities @@ -602,36 +512,6 @@ public async Task AnalyzeOperationRecognizePiiEntitiesWithPiiOptionsFull() Assert.AreEqual(expectedPiiCategoriesContent, piiCategories); } - [Test] - public void AnalyzeOperationRecognizePiiEntitiesWithTwoActions() - { - var mockResponse = new MockResponse(202); - mockResponse.AddHeader(new HttpHeader("Operation-Location", "something/jobs/2a96a91f-7edf-4931-a880-3fdee1d56f15")); - - var mockTransport = new MockTransport(new[] { mockResponse, mockResponse }); - var client = CreateTestClient(mockTransport); - - var documents = new List - { - "Elon Musk is the CEO of SpaceX and Tesla." - }; - - TextAnalyticsActions batchActions = new() - { - RecognizePiiEntitiesActions = new List() - { - new RecognizePiiEntitiesAction(), - new RecognizePiiEntitiesAction() - { - ModelVersion = "InvalidVersion" - } - }, - }; - - ArgumentException ex = Assert.ThrowsAsync(async () => await client.StartAnalyzeActionsAsync(documents, batchActions)); - Assert.AreEqual("Multiple of the same action is not currently supported.", ex.Message); - } - #endregion Pii entities #region Analyze sentiment @@ -739,36 +619,6 @@ public async Task AnalyzeOperationAnalyzeSentimentWithAnalyzeSentimentOptionsFul Assert.AreEqual(expectedOpinionMiningContent, opinionMining); } - [Test] - public void AnalyzeOperationAnalyzeSentimentWithTwoActions() - { - var mockResponse = new MockResponse(202); - mockResponse.AddHeader(new HttpHeader("Operation-Location", "something/jobs/2a96a91f-7edf-4931-a880-3fdee1d56f15")); - - var mockTransport = new MockTransport(new[] { mockResponse, mockResponse }); - var client = CreateTestClient(mockTransport); - - var documents = new List - { - "Elon Musk is the CEO of SpaceX and Tesla." - }; - - TextAnalyticsActions batchActions = new() - { - AnalyzeSentimentActions = new List() - { - new AnalyzeSentimentAction(), - new AnalyzeSentimentAction() - { - ModelVersion = "InvalidVersion" - } - }, - }; - - ArgumentException ex = Assert.ThrowsAsync(async () => await client.StartAnalyzeActionsAsync(documents, batchActions)); - Assert.AreEqual("Multiple of the same action is not currently supported.", ex.Message); - } - #endregion Analyze sentiment #region Extract summary @@ -806,36 +656,6 @@ public async Task AnalyzeOperationExtractSummaryWithDisableServiceLogs() Assert.AreEqual(expectedContent, logging); } - [Test] - public void AnalyzeOperationExtractSummaryWithTwoActions() - { - var mockResponse = new MockResponse(202); - mockResponse.AddHeader(new HttpHeader("Operation-Location", "something/jobs/2a96a91f-7edf-4931-a880-3fdee1d56f15")); - - var mockTransport = new MockTransport(new[] { mockResponse, mockResponse }); - var client = CreateTestClient(mockTransport); - - var documents = new List - { - "Elon Musk is the CEO of SpaceX and Tesla." - }; - - TextAnalyticsActions batchActions = new() - { - ExtractSummaryActions = new List() - { - new ExtractSummaryAction(), - new ExtractSummaryAction() - { - ModelVersion = "InvalidVersion" - } - }, - }; - - ArgumentException ex = Assert.ThrowsAsync(async () => await client.StartAnalyzeActionsAsync(documents, batchActions)); - Assert.AreEqual("Multiple of the same action is not currently supported.", ex.Message); - } - #endregion Extract summary #region Multi Category Classify @@ -872,36 +692,6 @@ public async Task AnalyzeOperationMultiCategoryClassifyWithDisableServiceLogs() var expectedContent = "loggingOptOut\":true"; Assert.AreEqual(expectedContent, logging); } - - [Test] - public void AnalyzeOperationMultiCategoryClassifyWithTwoActions() - { - var mockResponse = new MockResponse(202); - mockResponse.AddHeader(new HttpHeader("Operation-Location", "something/jobs/2a96a91f-7edf-4931-a880-3fdee1d56f15")); - - var mockTransport = new MockTransport(new[] { mockResponse, mockResponse }); - var client = CreateTestClient(mockTransport); - - var documents = new List - { - "Elon Musk is the CEO of SpaceX and Tesla." - }; - - TextAnalyticsActions batchActions = new() - { - MultiCategoryClassifyActions = new List() - { - new MultiCategoryClassifyAction(FakeProjectName, FakeDeploymentName), - new MultiCategoryClassifyAction(FakeProjectName, FakeDeploymentName) - { - DisableServiceLogs = true - } - }, - }; - - ArgumentException ex = Assert.ThrowsAsync(async () => await client.StartAnalyzeActionsAsync(documents, batchActions)); - Assert.AreEqual("Multiple of the same action is not currently supported.", ex.Message); - } #endregion #region Single Category Classify @@ -938,36 +728,6 @@ public async Task AnalyzeOperationSingleCategoryClassifyWithDisableServiceLogs() var expectedContent = "loggingOptOut\":true"; Assert.AreEqual(expectedContent, logging); } - - [Test] - public void AnalyzeOperationSingleCategoryClassifyWithTwoActions() - { - var mockResponse = new MockResponse(202); - mockResponse.AddHeader(new HttpHeader("Operation-Location", "something/jobs/2a96a91f-7edf-4931-a880-3fdee1d56f15")); - - var mockTransport = new MockTransport(new[] { mockResponse, mockResponse }); - var client = CreateTestClient(mockTransport); - - var documents = new List - { - "Elon Musk is the CEO of SpaceX and Tesla." - }; - - TextAnalyticsActions batchActions = new() - { - SingleCategoryClassifyActions = new List() - { - new SingleCategoryClassifyAction(FakeProjectName, FakeDeploymentName), - new SingleCategoryClassifyAction(FakeProjectName, FakeDeploymentName) - { - DisableServiceLogs = true - } - }, - }; - - ArgumentException ex = Assert.ThrowsAsync(async () => await client.StartAnalyzeActionsAsync(documents, batchActions)); - Assert.AreEqual("Multiple of the same action is not currently supported.", ex.Message); - } #endregion [Test] From ab247917c3c3699379a1021a742c77221106d637 Mon Sep 17 00:00:00 2001 From: Salah Mostafa Date: Mon, 11 Oct 2021 13:44:46 +0200 Subject: [PATCH 04/16] Added actionname to the output in samples + added tests. --- .../tests/MultiCategoryClassifyTests.cs | 38 +++++++++++++++++++ .../tests/SingleCategoryClassifyTests.cs | 33 ++++++++++++++++ .../Sample10_SingleCategoryClassify.cs | 1 + .../Sample10_SingleCategoryClassifyAsync.cs | 1 + ...ple10_SingleCategoryClassifyConvenience.cs | 1 + ..._SingleCategoryClassifyConvenienceAsync.cs | 1 + .../samples/Sample11_MultiCategoryClassify.cs | 1 + .../Sample11_MultiCategoryClassifyAsync.cs | 1 + ...mple11_MultiCategoryClassifyConvenience.cs | 1 + ...1_MultiCategoryClassifyConvenienceAsync.cs | 1 + .../tests/samples/Sample_AnalyzeOperation.cs | 1 + .../samples/Sample_AnalyzeOperationAsync.cs | 1 + .../Sample_AnalyzeOperationConvenience.cs | 1 + ...Sample_AnalyzeOperationConvenienceAsync.cs | 1 + 14 files changed, 83 insertions(+) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/MultiCategoryClassifyTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/MultiCategoryClassifyTests.cs index 3d9a1e1a23ab..8f0bfcecf8a2 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/MultiCategoryClassifyTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/MultiCategoryClassifyTests.cs @@ -212,6 +212,44 @@ public async Task MultiCategoryClassifyBatchWithStatisticsTest() ValidateSummaryBatchResult(multiCategoryClassifyResults, includeStatistics: true); } + [RecordedTest] + public async Task MultiCategoryClassifyWithMultipleActions() + { + TextAnalyticsClient client = GetClient(); + + TextAnalyticsActions batchActions = new TextAnalyticsActions() + { + MultiCategoryClassifyActions = new List() + { + new MultiCategoryClassifyAction(TestEnvironment.MultiClassificationProjectName, TestEnvironment.MultiClassificationDeploymentName) + { + DisableServiceLogs = true, + ActionName = "MultiCategoryClassifyWithDisabledServiceLogs" + }, + new MultiCategoryClassifyAction(TestEnvironment.MultiClassificationProjectName, TestEnvironment.MultiClassificationDeploymentName) + { + ActionName = "MultiCategoryClassify" + } + } + }; + + AnalyzeActionsOperation operation = await client.StartAnalyzeActionsAsync(s_multiCategoryClassifyBatchConvenienceDocuments, batchActions); + + await operation.WaitForCompletionAsync(); + + // Take the first page + AnalyzeActionsResult resultCollection = operation.Value.ToEnumerableAsync().Result.FirstOrDefault(); + + IReadOnlyCollection multiCategoryClassifyActionsResults = resultCollection.MultiCategoryClassifyResults; + + Assert.IsNotNull(multiCategoryClassifyActionsResults); + Assert.AreEqual(2, multiCategoryClassifyActionsResults.Count); + Assert.AreEqual(2, multiCategoryClassifyActionsResults.FirstOrDefault().DocumentsResults.Count); + + Assert.AreEqual("MultiCategoryClassifyWithDisabledServiceLogs", multiCategoryClassifyActionsResults.ElementAt(0).ActionName); + Assert.AreEqual("MultiCategoryClassify", multiCategoryClassifyActionsResults.ElementAt(1).ActionName); + } + private void ValidateSummaryDocumentResult(ClassificationCategoryCollection classificationCollection) { Assert.IsNotNull(classificationCollection.Warnings); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SingleCategoryClassifyTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SingleCategoryClassifyTests.cs index ccfcb674212c..7e2ab163bc7b 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SingleCategoryClassifyTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SingleCategoryClassifyTests.cs @@ -212,6 +212,39 @@ public async Task SingleCategoryClassifyBatchWithStatisticsTest() ValidateSummaryBatchResult(singleCategoryClassifyResults, includeStatistics: true); } + [RecordedTest] + public async Task SingleCategoryClassifyWithMultipleActions() + { + TextAnalyticsClient client = GetClient(); + + TextAnalyticsActions batchActions = new TextAnalyticsActions() + { + SingleCategoryClassifyActions = new List() + { + new SingleCategoryClassifyAction(TestEnvironment.SingleClassificationProjectName, TestEnvironment.SingleClassificationDeploymentName) + { + DisableServiceLogs = true, + ActionName = "SingleCategoryClassifyWithDisabledServiceLogs" + }, + new SingleCategoryClassifyAction(TestEnvironment.SingleClassificationProjectName, TestEnvironment.SingleClassificationDeploymentName) + { + ActionName = "SingleCategoryClassify" + } + } + }; + + AnalyzeActionsOperation operation = await client.StartAnalyzeActionsAsync(s_singleCategoryClassifyBatchConvenienceDocuments, batchActions); + + await operation.WaitForCompletionAsync(); + + // Take the first page + AnalyzeActionsResult resultCollection = operation.Value.ToEnumerableAsync().Result.FirstOrDefault(); + IReadOnlyCollection singleCategoryClassifyActionsResults = resultCollection.SingleCategoryClassifyResults; + + Assert.IsNotNull(singleCategoryClassifyActionsResults); + Assert.AreEqual(2, singleCategoryClassifyActionsResults.Count); + Assert.AreEqual(2, singleCategoryClassifyActionsResults.FirstOrDefault().DocumentsResults.Count); + } private void ValidateSummaryDocumentResult(ClassificationCategory classification) { Assert.GreaterOrEqual(classification.ConfidenceScore, 0); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample10_SingleCategoryClassify.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample10_SingleCategoryClassify.cs index 775193a0457f..6ce10dcdc3ce 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample10_SingleCategoryClassify.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample10_SingleCategoryClassify.cs @@ -81,6 +81,7 @@ public void SingleCategoryClassify() foreach (SingleCategoryClassifyActionResult classificationActionResults in singleClassificationActionResults) { + Console.WriteLine($" Action name: {classificationActionResults.ActionName}"); foreach (SingleCategoryClassifyResult documentResults in classificationActionResults.DocumentsResults) { Console.WriteLine($" Class category \"{documentResults.Classification.Category}\" predicted with a confidence score of {documentResults.Classification.ConfidenceScore}."); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample10_SingleCategoryClassifyAsync.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample10_SingleCategoryClassifyAsync.cs index ccb583d26aab..3f5e9c39e722 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample10_SingleCategoryClassifyAsync.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample10_SingleCategoryClassifyAsync.cs @@ -68,6 +68,7 @@ public async Task SingleCategoryClassifyAsync() foreach (SingleCategoryClassifyActionResult classificationActionResults in singleClassificationActionResults) { + Console.WriteLine($" Action name: {classificationActionResults.ActionName}"); foreach (SingleCategoryClassifyResult documentResults in classificationActionResults.DocumentsResults) { Console.WriteLine($" Class category \"{documentResults.Classification.Category}\" predicted with a confidence score of {documentResults.Classification.ConfidenceScore}."); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample10_SingleCategoryClassifyConvenience.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample10_SingleCategoryClassifyConvenience.cs index 5f38abc706e3..30204d8b1d12 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample10_SingleCategoryClassifyConvenience.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample10_SingleCategoryClassifyConvenience.cs @@ -78,6 +78,7 @@ public void SingleCategoryClassifyConvenience() foreach (SingleCategoryClassifyActionResult classificationActionResults in singleClassificationActionResults) { + Console.WriteLine($" Action name: {classificationActionResults.ActionName}"); foreach (SingleCategoryClassifyResult documentResults in classificationActionResults.DocumentsResults) { Console.WriteLine($" Class category \"{documentResults.Classification.Category}\" predicted with a confidence score of {documentResults.Classification.ConfidenceScore}."); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample10_SingleCategoryClassifyConvenienceAsync.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample10_SingleCategoryClassifyConvenienceAsync.cs index 53d4e0f28e02..d2ae576b15e5 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample10_SingleCategoryClassifyConvenienceAsync.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample10_SingleCategoryClassifyConvenienceAsync.cs @@ -75,6 +75,7 @@ public async Task SingleCategoryClassifyConvenienceAsync() foreach (SingleCategoryClassifyActionResult classificationActionResults in singleClassificationActionResults) { + Console.WriteLine($" Action name: {classificationActionResults.ActionName}"); foreach (SingleCategoryClassifyResult documentResults in classificationActionResults.DocumentsResults) { Console.WriteLine($" Class category \"{documentResults.Classification.Category}\" predicted with a confidence score of {documentResults.Classification.ConfidenceScore}."); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample11_MultiCategoryClassify.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample11_MultiCategoryClassify.cs index 20eea3d305ea..9521de73c699 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample11_MultiCategoryClassify.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample11_MultiCategoryClassify.cs @@ -81,6 +81,7 @@ public void MultiCategoryClassify() foreach (MultiCategoryClassifyActionResult classificationActionResults in multiClassificationActionResults) { + Console.WriteLine($" Action name: {classificationActionResults.ActionName}"); foreach (MultiCategoryClassifyResult documentResults in classificationActionResults.DocumentsResults) { if (documentResults.Classifications.Count > 0) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample11_MultiCategoryClassifyAsync.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample11_MultiCategoryClassifyAsync.cs index 6ce186d23361..16cf9ef2c50a 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample11_MultiCategoryClassifyAsync.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample11_MultiCategoryClassifyAsync.cs @@ -68,6 +68,7 @@ public async Task MultiCategoryClassifyAsync() foreach (MultiCategoryClassifyActionResult classificationActionResults in multiClassificationActionResults) { + Console.WriteLine($" Action name: {classificationActionResults.ActionName}"); foreach (MultiCategoryClassifyResult documentResults in classificationActionResults.DocumentsResults) { if (documentResults.Classifications.Count > 0) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample11_MultiCategoryClassifyConvenience.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample11_MultiCategoryClassifyConvenience.cs index c67c243e4e57..5fb94d6e75f8 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample11_MultiCategoryClassifyConvenience.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample11_MultiCategoryClassifyConvenience.cs @@ -78,6 +78,7 @@ public void MultiCategoryClassifyConvenience() foreach (MultiCategoryClassifyActionResult classificationActionResults in multiClassificationActionResults) { + Console.WriteLine($" Action name: {classificationActionResults.ActionName}"); foreach (MultiCategoryClassifyResult documentResults in classificationActionResults.DocumentsResults) { if (documentResults.Classifications.Count > 0) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample11_MultiCategoryClassifyConvenienceAsync.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample11_MultiCategoryClassifyConvenienceAsync.cs index e538ca37f6e2..e41b77c17720 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample11_MultiCategoryClassifyConvenienceAsync.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample11_MultiCategoryClassifyConvenienceAsync.cs @@ -75,6 +75,7 @@ public async Task MultiCategoryClassifyConvenienceAsync() foreach (MultiCategoryClassifyActionResult classificationActionResults in multiClassificationActionResults) { + Console.WriteLine($" Action name: {classificationActionResults.ActionName}"); foreach (MultiCategoryClassifyResult documentResults in classificationActionResults.DocumentsResults) { if (documentResults.Classifications.Count > 0) 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 33ad3dd60d0e..2b49390fc7d0 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperation.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperation.cs @@ -82,6 +82,7 @@ We tried again today and it was amazing. Everyone in my family liked the trail a int docNumber = 1; foreach (RecognizeEntitiesActionResult entitiesActionResults in entitiesResults) { + Console.WriteLine($" Action name: {entitiesActionResults.ActionName}"); foreach (RecognizeEntitiesResult documentResults in entitiesActionResults.DocumentsResults) { Console.WriteLine($" Document #{docNumber++}"); 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 bf8390be05f1..bbbdf72964d4 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperationAsync.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperationAsync.cs @@ -73,6 +73,7 @@ We tried again today and it was amazing. Everyone in my family liked the trail a int docNumber = 1; foreach (RecognizeEntitiesActionResult entitiesActionResults in entitiesResults) { + Console.WriteLine($" Action name: {entitiesActionResults.ActionName}"); foreach (RecognizeEntitiesResult documentResults in entitiesActionResults.DocumentsResults) { Console.WriteLine($" Document #{docNumber++}"); 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 eeee8d30207e..196b3bc518a8 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperationConvenience.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperationConvenience.cs @@ -76,6 +76,7 @@ We tried again today and it was amazing. Everyone in my family liked the trail a int docNumber = 1; foreach (RecognizeEntitiesActionResult entitiesActionResults in entitiesResults) { + Console.WriteLine($" Action name: {entitiesActionResults.ActionName}"); foreach (RecognizeEntitiesResult documentResults in entitiesActionResults.DocumentsResults) { Console.WriteLine($" Document #{docNumber++}"); 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 d025f64e9106..7cfa88aef10f 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperationConvenienceAsync.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperationConvenienceAsync.cs @@ -68,6 +68,7 @@ We tried again today and it was amazing. Everyone in my family liked the trail a int docNumber = 1; foreach (RecognizeEntitiesActionResult entitiesActionResults in entitiesResults) { + Console.WriteLine($" Action name: {entitiesActionResults.ActionName}"); foreach (RecognizeEntitiesResult documentResults in entitiesActionResults.DocumentsResults) { Console.WriteLine($" Document #{docNumber++}"); From ac8d78078a074ed3a89a56e10ca981621341bc96 Mon Sep 17 00:00:00 2001 From: Salah Mostafa Date: Sun, 17 Oct 2021 16:38:44 +0200 Subject: [PATCH 05/16] Added overloaded functions + updated changelog --- .../Azure.AI.TextAnalytics/CHANGELOG.md | 3 + .../src/TextAnalyticsModelFactory.cs | 247 ++++++++++++++++-- .../tests/TextAnalyticsModelFactoryTests.cs | 4 +- 3 files changed, 235 insertions(+), 19 deletions(-) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/CHANGELOG.md b/sdk/textanalytics/Azure.AI.TextAnalytics/CHANGELOG.md index e5065ecd625a..c2ab74d38f6b 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/CHANGELOG.md +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/CHANGELOG.md @@ -4,6 +4,9 @@ ### Features Added - Adding support for three new actions in `StartAnalyzeActions`: `RecognizeCustomEntities`, `SingleCategoryClassify`, and `MultiCategoriesClassify`. The new actions allow you to use custom models to perform entity recognition and category classification. +- Added property `ActionName` to all `xxActions` input types so user can specify a name per action. If not provided, service will generate a name. +- Added property `ActionName` to all `xxActionResult` output types that displays the name of each action. +- Added suppport for multiple actions of the same type. ### Breaking Changes diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs index 4cce342cb660..b411420df1b2 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs @@ -833,6 +833,20 @@ public static ExtractKeyPhrasesActionResult ExtractKeyPhrasesActionResult( return new ExtractKeyPhrasesActionResult(result, actionName, completedOn); } + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// A new instance of for mocking purposes. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ExtractKeyPhrasesActionResult ExtractKeyPhrasesActionResult( + ExtractKeyPhrasesResultCollection result, + DateTimeOffset completedOn) + { + return new ExtractKeyPhrasesActionResult(result, default, completedOn); + } + /// /// Initializes a new instance of for mocking purposes. /// @@ -850,6 +864,22 @@ public static ExtractKeyPhrasesActionResult ExtractKeyPhrasesActionResult( return new ExtractKeyPhrasesActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); } + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// Sets the property. + /// A new instance of for mocking purposes. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ExtractKeyPhrasesActionResult ExtractKeyPhrasesActionResult( + DateTimeOffset completedOn, + string code, + string message) + { + return new ExtractKeyPhrasesActionResult(completedOn, default, new TextAnalyticsErrorInternal(code, message)); + } + /// /// Initializes a new instance of for mocking purposes. /// @@ -865,6 +895,20 @@ public static ExtractSummaryActionResult ExtractSummaryActionResult( return new ExtractSummaryActionResult(result, actionName, completedOn); } + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// A new instance of for mocking purposes. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ExtractSummaryActionResult ExtractSummaryActionResult( + ExtractSummaryResultCollection result, + DateTimeOffset completedOn) + { + return new ExtractSummaryActionResult(result, default, completedOn); + } + /// /// Initializes a new instance of for mocking purposes. /// @@ -883,31 +927,19 @@ public static ExtractSummaryActionResult ExtractSummaryActionResult( } /// - /// Initializes a new instance of for mocking purposes. - /// - /// Sets the property. - /// Sets the property. - /// A new instance of for mocking purposes. - public static RecognizeCustomEntitiesActionResult RecognizeCustomEntitiesActionResult( - RecognizeCustomEntitiesResultCollection result, - DateTimeOffset completedOn) - { - return new RecognizeCustomEntitiesActionResult(result, completedOn); - } - - /// - /// Initializes a new instance of for mocking purposes. + /// Initializes a new instance of for mocking purposes. /// /// Sets the property. /// Sets the property. /// Sets the property. - /// A new instance of for mocking purposes. - public static RecognizeCustomEntitiesActionResult RecognizeCustomEntitiesActionResult( + /// A new instance of for mocking purposes. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ExtractSummaryActionResult ExtractSummaryActionResult( DateTimeOffset completedOn, string code, string message) { - return new RecognizeCustomEntitiesActionResult(completedOn, new TextAnalyticsErrorInternal(code, message)); + return new ExtractSummaryActionResult(completedOn, default, new TextAnalyticsErrorInternal(code, message)); } /// @@ -925,6 +957,20 @@ public static MultiCategoryClassifyActionResult MultiCategoryClassifyActionResul return new MultiCategoryClassifyActionResult(result, actionName, completedOn); } + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// A new instance of for mocking purposes. + [EditorBrowsable(EditorBrowsableState.Never)] + public static MultiCategoryClassifyActionResult MultiCategoryClassifyActionResult( + MultiCategoryClassifyResultCollection result, + DateTimeOffset completedOn) + { + return new MultiCategoryClassifyActionResult(result, default, completedOn); + } + /// /// Initializes a new instance of for mocking purposes. /// @@ -942,6 +988,22 @@ public static MultiCategoryClassifyActionResult MultiCategoryClassifyActionResul return new MultiCategoryClassifyActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); } + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// Sets the property. + /// A new instance of for mocking purposes. + [EditorBrowsable(EditorBrowsableState.Never)] + public static MultiCategoryClassifyActionResult MultiCategoryClassifyActionResult( + DateTimeOffset completedOn, + string code, + string message) + { + return new MultiCategoryClassifyActionResult(completedOn, default, new TextAnalyticsErrorInternal(code, message)); + } + /// /// Initializes a new instance of for mocking purposes. /// @@ -957,6 +1019,20 @@ public static SingleCategoryClassifyActionResult SingleCategoryClassifyActionRes return new SingleCategoryClassifyActionResult(result, actionName, completedOn); } + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// A new instance of for mocking purposes. + [EditorBrowsable(EditorBrowsableState.Never)] + public static SingleCategoryClassifyActionResult SingleCategoryClassifyActionResult( + SingleCategoryClassifyResultCollection result, + DateTimeOffset completedOn) + { + return new SingleCategoryClassifyActionResult(result, default, completedOn); + } + /// /// Initializes a new instance of for mocking purposes. /// @@ -974,6 +1050,22 @@ public static SingleCategoryClassifyActionResult SingleCategoryClassifyActionRes return new SingleCategoryClassifyActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); } + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// Sets the property. + /// A new instance of for mocking purposes. + [EditorBrowsable(EditorBrowsableState.Never)] + public static SingleCategoryClassifyActionResult SingleCategoryClassifyActionResult( + DateTimeOffset completedOn, + string code, + string message) + { + return new SingleCategoryClassifyActionResult(completedOn, default, new TextAnalyticsErrorInternal(code, message)); + } + /// /// Initializes a new instance of for mocking purposes. /// @@ -989,6 +1081,21 @@ public static AnalyzeSentimentActionResult AnalyzeSentimentActionResult( return new AnalyzeSentimentActionResult(result, actionName, completedOn); } + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// A new instance of for mocking purposes. + + [EditorBrowsable(EditorBrowsableState.Never)] + public static AnalyzeSentimentActionResult AnalyzeSentimentActionResult( + AnalyzeSentimentResultCollection result, + DateTimeOffset completedOn) + { + return new AnalyzeSentimentActionResult(result, default, completedOn); + } + /// /// Initializes a new instance of for mocking purposes. /// @@ -1006,6 +1113,22 @@ public static AnalyzeSentimentActionResult AnalyzeSentimentActionResult( return new AnalyzeSentimentActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); } + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// Sets the property. + /// A new instance of for mocking purposes. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AnalyzeSentimentActionResult AnalyzeSentimentActionResult( + DateTimeOffset completedOn, + string code, + string message) + { + return new AnalyzeSentimentActionResult(completedOn, default, new TextAnalyticsErrorInternal(code, message)); + } + /// /// Initializes a new instance of for mocking purposes. /// @@ -1021,6 +1144,20 @@ public static RecognizeLinkedEntitiesActionResult RecognizeLinkedEntitiesActionR return new RecognizeLinkedEntitiesActionResult(result, actionName, completedOn); } + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// A new instance of for mocking purposes. + [EditorBrowsable(EditorBrowsableState.Never)] + public static RecognizeLinkedEntitiesActionResult RecognizeLinkedEntitiesActionResult( + RecognizeLinkedEntitiesResultCollection result, + DateTimeOffset completedOn) + { + return new RecognizeLinkedEntitiesActionResult(result, default, completedOn); + } + /// /// Initializes a new instance of for mocking purposes. /// @@ -1038,6 +1175,22 @@ public static RecognizeLinkedEntitiesActionResult RecognizeLinkedEntitiesActionR return new RecognizeLinkedEntitiesActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); } + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// Sets the property. + /// A new instance of for mocking purposes. + [EditorBrowsable(EditorBrowsableState.Never)] + public static RecognizeLinkedEntitiesActionResult RecognizeLinkedEntitiesActionResult( + DateTimeOffset completedOn, + string code, + string message) + { + return new RecognizeLinkedEntitiesActionResult(completedOn, default, new TextAnalyticsErrorInternal(code, message)); + } + /// /// Initializes a new instance of for mocking purposes. /// @@ -1053,6 +1206,20 @@ public static RecognizeEntitiesActionResult RecognizeEntitiesActionResult( return new RecognizeEntitiesActionResult(result, actionName, completedOn); } + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// A new instance of for mocking purposes. + [EditorBrowsable(EditorBrowsableState.Never)] + public static RecognizeEntitiesActionResult RecognizeEntitiesActionResult( + RecognizeEntitiesResultCollection result, + DateTimeOffset completedOn) + { + return new RecognizeEntitiesActionResult(result, default, completedOn); + } + /// /// Initializes a new instance of for mocking purposes. /// @@ -1070,6 +1237,22 @@ public static RecognizeEntitiesActionResult RecognizeEntitiesActionResult( return new RecognizeEntitiesActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); } + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// Sets the property. + /// A new instance of for mocking purposes. + [EditorBrowsable(EditorBrowsableState.Never)] + public static RecognizeEntitiesActionResult RecognizeEntitiesActionResult( + DateTimeOffset completedOn, + string code, + string message) + { + return new RecognizeEntitiesActionResult(completedOn, default, new TextAnalyticsErrorInternal(code, message)); + } + /// ` /// Initializes a new instance of for mocking purposes. /// @@ -1085,6 +1268,20 @@ public static RecognizePiiEntitiesActionResult RecognizePiiEntitiesActionResult( return new RecognizePiiEntitiesActionResult(result, actionName, completedOn); } + /// ` + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// A new instance of for mocking purposes. + [EditorBrowsable(EditorBrowsableState.Never)] + public static RecognizePiiEntitiesActionResult RecognizePiiEntitiesActionResult( + RecognizePiiEntitiesResultCollection result, + DateTimeOffset completedOn) + { + return new RecognizePiiEntitiesActionResult(result, default, completedOn); + } + /// /// Initializes a new instance of for mocking purposes. /// @@ -1102,6 +1299,22 @@ public static RecognizePiiEntitiesActionResult RecognizePiiEntitiesActionResult( return new RecognizePiiEntitiesActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); } + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// Sets the property. + /// A new instance of for mocking purposes. + [EditorBrowsable(EditorBrowsableState.Never)] + public static RecognizePiiEntitiesActionResult RecognizePiiEntitiesActionResult( + DateTimeOffset completedOn, + string code, + string message) + { + return new RecognizePiiEntitiesActionResult(completedOn, default, new TextAnalyticsErrorInternal(code, message)); + } + #endregion Action Result Models #region Healthcare diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsModelFactoryTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsModelFactoryTests.cs index ef608b6db28e..ee09ff40fba1 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsModelFactoryTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsModelFactoryTests.cs @@ -201,7 +201,7 @@ public void ExtractSummaryActionResultWithoutError() { var result = TextAnalyticsModelFactory.ExtractSummaryResultCollection(new List(), default, default); var completedOn = DateTimeOffset.UtcNow; - string actionName = ""; + string actionName = "ExtractSummary"; var actionResult = TextAnalyticsModelFactory.ExtractSummaryActionResult(result, actionName, completedOn); @@ -218,7 +218,7 @@ public void ExtractSummaryActionResultWithError() var completedOn = DateTimeOffset.UtcNow; var code = "code"; var message = "message"; - string actionName = ""; + string actionName = "ExtractSummary"; var actionResult = TextAnalyticsModelFactory.ExtractSummaryActionResult(actionName, completedOn, code, message); From 326245fa688a62655d328d7b2fc8e2baa46db7c0 Mon Sep 17 00:00:00 2001 From: Salah Mostafa Date: Sun, 17 Oct 2021 16:49:37 +0200 Subject: [PATCH 06/16] generated code --- .../Azure.AI.TextAnalytics.netstandard2.0.cs | 32 +++++++++++++++++++ .../tests/TextAnalyticsModelFactoryTests.cs | 32 +++++++++---------- 2 files changed, 48 insertions(+), 16 deletions(-) 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 c4ed807cab34..78d4f90e43b5 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 @@ -1017,7 +1017,11 @@ public static partial class TextAnalyticsModelFactory public static Azure.AI.TextAnalytics.AnalyzeHealthcareEntitiesResult AnalyzeHealthcareEntitiesResult(string id, Azure.AI.TextAnalytics.TextDocumentStatistics statistics, System.Collections.Generic.IEnumerable healthcareEntities, System.Collections.Generic.IEnumerable entityRelations, System.Collections.Generic.IEnumerable warnings) { throw null; } public static Azure.AI.TextAnalytics.AnalyzeHealthcareEntitiesResult AnalyzeHealthcareEntitiesResult(string id, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.AnalyzeHealthcareEntitiesResultCollection AnalyzeHealthcareEntitiesResultCollection(System.Collections.Generic.IEnumerable list, Azure.AI.TextAnalytics.TextDocumentBatchStatistics statistics, string modelVersion) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.AI.TextAnalytics.AnalyzeSentimentActionResult AnalyzeSentimentActionResult(Azure.AI.TextAnalytics.AnalyzeSentimentResultCollection result, System.DateTimeOffset completedOn) { throw null; } public static Azure.AI.TextAnalytics.AnalyzeSentimentActionResult AnalyzeSentimentActionResult(Azure.AI.TextAnalytics.AnalyzeSentimentResultCollection result, string actionName, System.DateTimeOffset completedOn) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.AI.TextAnalytics.AnalyzeSentimentActionResult AnalyzeSentimentActionResult(System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.AnalyzeSentimentActionResult AnalyzeSentimentActionResult(string actionName, System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.AnalyzeSentimentResult AnalyzeSentimentResult(string id, Azure.AI.TextAnalytics.TextAnalyticsError error) { throw null; } public static Azure.AI.TextAnalytics.AnalyzeSentimentResult AnalyzeSentimentResult(string id, Azure.AI.TextAnalytics.TextDocumentStatistics statistics, Azure.AI.TextAnalytics.DocumentSentiment documentSentiment) { throw null; } @@ -1035,12 +1039,20 @@ public static partial class TextAnalyticsModelFactory public static Azure.AI.TextAnalytics.DetectLanguageResultCollection DetectLanguageResultCollection(System.Collections.Generic.IEnumerable list, Azure.AI.TextAnalytics.TextDocumentBatchStatistics statistics, string modelVersion) { throw null; } public static Azure.AI.TextAnalytics.DocumentSentiment DocumentSentiment(Azure.AI.TextAnalytics.TextSentiment sentiment, double positiveScore, double neutralScore, double negativeScore, System.Collections.Generic.List sentenceSentiments, System.Collections.Generic.IList warnings = null) { throw null; } public static Azure.AI.TextAnalytics.EntityDataSource EntityDataSource(string name = null, string entityId = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.AI.TextAnalytics.ExtractKeyPhrasesActionResult ExtractKeyPhrasesActionResult(Azure.AI.TextAnalytics.ExtractKeyPhrasesResultCollection result, System.DateTimeOffset completedOn) { throw null; } public static Azure.AI.TextAnalytics.ExtractKeyPhrasesActionResult ExtractKeyPhrasesActionResult(Azure.AI.TextAnalytics.ExtractKeyPhrasesResultCollection result, string actionName, System.DateTimeOffset completedOn) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.AI.TextAnalytics.ExtractKeyPhrasesActionResult ExtractKeyPhrasesActionResult(System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.ExtractKeyPhrasesActionResult ExtractKeyPhrasesActionResult(string actionName, System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.ExtractKeyPhrasesResult ExtractKeyPhrasesResult(string id, Azure.AI.TextAnalytics.TextAnalyticsError error) { throw null; } public static Azure.AI.TextAnalytics.ExtractKeyPhrasesResult ExtractKeyPhrasesResult(string id, Azure.AI.TextAnalytics.TextDocumentStatistics statistics, Azure.AI.TextAnalytics.KeyPhraseCollection keyPhrases) { throw null; } public static Azure.AI.TextAnalytics.ExtractKeyPhrasesResultCollection ExtractKeyPhrasesResultCollection(System.Collections.Generic.IEnumerable list, Azure.AI.TextAnalytics.TextDocumentBatchStatistics statistics, string modelVersion) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.AI.TextAnalytics.ExtractSummaryActionResult ExtractSummaryActionResult(Azure.AI.TextAnalytics.ExtractSummaryResultCollection result, System.DateTimeOffset completedOn) { throw null; } public static Azure.AI.TextAnalytics.ExtractSummaryActionResult ExtractSummaryActionResult(Azure.AI.TextAnalytics.ExtractSummaryResultCollection result, string actionName, System.DateTimeOffset completedOn) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.AI.TextAnalytics.ExtractSummaryActionResult ExtractSummaryActionResult(System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.ExtractSummaryActionResult ExtractSummaryActionResult(string actionName, System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.ExtractSummaryResult ExtractSummaryResult(string id, Azure.AI.TextAnalytics.TextAnalyticsError error) { throw null; } public static Azure.AI.TextAnalytics.ExtractSummaryResult ExtractSummaryResult(string id, Azure.AI.TextAnalytics.TextDocumentStatistics statistics, Azure.AI.TextAnalytics.SummarySentenceCollection sentences) { throw null; } @@ -1057,24 +1069,40 @@ public static partial class TextAnalyticsModelFactory [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.AI.TextAnalytics.LinkedEntityMatch LinkedEntityMatch(string text, double score) { throw null; } public static Azure.AI.TextAnalytics.LinkedEntityMatch LinkedEntityMatch(string text, double score, int offset, int length) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.AI.TextAnalytics.MultiCategoryClassifyActionResult MultiCategoryClassifyActionResult(Azure.AI.TextAnalytics.MultiCategoryClassifyResultCollection result, System.DateTimeOffset completedOn) { throw null; } public static Azure.AI.TextAnalytics.MultiCategoryClassifyActionResult MultiCategoryClassifyActionResult(Azure.AI.TextAnalytics.MultiCategoryClassifyResultCollection result, string actionName, System.DateTimeOffset completedOn) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.AI.TextAnalytics.MultiCategoryClassifyActionResult MultiCategoryClassifyActionResult(System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.MultiCategoryClassifyActionResult MultiCategoryClassifyActionResult(string actionName, System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.MultiCategoryClassifyResult MultiCategoryClassifyResult(string id, Azure.AI.TextAnalytics.TextAnalyticsError error) { throw null; } public static Azure.AI.TextAnalytics.MultiCategoryClassifyResult MultiCategoryClassifyResult(string id, Azure.AI.TextAnalytics.TextDocumentStatistics statistics, Azure.AI.TextAnalytics.ClassificationCategoryCollection documentClassificationCollection, System.Collections.Generic.IEnumerable warnings = null) { throw null; } public static Azure.AI.TextAnalytics.MultiCategoryClassifyResultCollection MultiCategoryClassifyResultCollection(System.Collections.Generic.IEnumerable classificationResultList, Azure.AI.TextAnalytics.TextDocumentBatchStatistics statistics, string projectName, string deploymentName) { throw null; } public static Azure.AI.TextAnalytics.PiiEntity PiiEntity(string text, string category, string subCategory, double score, int offset, int length) { throw null; } public static Azure.AI.TextAnalytics.PiiEntityCollection PiiEntityCollection(System.Collections.Generic.IEnumerable entities, string redactedText, System.Collections.Generic.IEnumerable warnings = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.AI.TextAnalytics.RecognizeEntitiesActionResult RecognizeEntitiesActionResult(Azure.AI.TextAnalytics.RecognizeEntitiesResultCollection result, System.DateTimeOffset completedOn) { throw null; } public static Azure.AI.TextAnalytics.RecognizeEntitiesActionResult RecognizeEntitiesActionResult(Azure.AI.TextAnalytics.RecognizeEntitiesResultCollection result, string actionName, System.DateTimeOffset completedOn) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.AI.TextAnalytics.RecognizeEntitiesActionResult RecognizeEntitiesActionResult(System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.RecognizeEntitiesActionResult RecognizeEntitiesActionResult(string actionName, System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.RecognizeEntitiesResult RecognizeEntitiesResult(string id, Azure.AI.TextAnalytics.TextAnalyticsError error) { throw null; } public static Azure.AI.TextAnalytics.RecognizeEntitiesResult RecognizeEntitiesResult(string id, Azure.AI.TextAnalytics.TextDocumentStatistics statistics, Azure.AI.TextAnalytics.CategorizedEntityCollection entities) { throw null; } public static Azure.AI.TextAnalytics.RecognizeEntitiesResultCollection RecognizeEntitiesResultCollection(System.Collections.Generic.IEnumerable list, Azure.AI.TextAnalytics.TextDocumentBatchStatistics statistics, string modelVersion) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.AI.TextAnalytics.RecognizeLinkedEntitiesActionResult RecognizeLinkedEntitiesActionResult(Azure.AI.TextAnalytics.RecognizeLinkedEntitiesResultCollection result, System.DateTimeOffset completedOn) { throw null; } public static Azure.AI.TextAnalytics.RecognizeLinkedEntitiesActionResult RecognizeLinkedEntitiesActionResult(Azure.AI.TextAnalytics.RecognizeLinkedEntitiesResultCollection result, string actionName, System.DateTimeOffset completedOn) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.AI.TextAnalytics.RecognizeLinkedEntitiesActionResult RecognizeLinkedEntitiesActionResult(System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.RecognizeLinkedEntitiesActionResult RecognizeLinkedEntitiesActionResult(string actionName, System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.RecognizeLinkedEntitiesResult RecognizeLinkedEntitiesResult(string id, Azure.AI.TextAnalytics.TextAnalyticsError error) { throw null; } public static Azure.AI.TextAnalytics.RecognizeLinkedEntitiesResult RecognizeLinkedEntitiesResult(string id, Azure.AI.TextAnalytics.TextDocumentStatistics statistics, Azure.AI.TextAnalytics.LinkedEntityCollection linkedEntities) { throw null; } public static Azure.AI.TextAnalytics.RecognizeLinkedEntitiesResultCollection RecognizeLinkedEntitiesResultCollection(System.Collections.Generic.IEnumerable list, Azure.AI.TextAnalytics.TextDocumentBatchStatistics statistics, string modelVersion) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.AI.TextAnalytics.RecognizePiiEntitiesActionResult RecognizePiiEntitiesActionResult(Azure.AI.TextAnalytics.RecognizePiiEntitiesResultCollection result, System.DateTimeOffset completedOn) { throw null; } public static Azure.AI.TextAnalytics.RecognizePiiEntitiesActionResult RecognizePiiEntitiesActionResult(Azure.AI.TextAnalytics.RecognizePiiEntitiesResultCollection result, string actionName, System.DateTimeOffset completedOn) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.AI.TextAnalytics.RecognizePiiEntitiesActionResult RecognizePiiEntitiesActionResult(System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.RecognizePiiEntitiesActionResult RecognizePiiEntitiesActionResult(string actionName, System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.RecognizePiiEntitiesResult RecognizePiiEntitiesResult(string id, Azure.AI.TextAnalytics.TextAnalyticsError error) { throw null; } public static Azure.AI.TextAnalytics.RecognizePiiEntitiesResult RecognizePiiEntitiesResult(string id, Azure.AI.TextAnalytics.TextDocumentStatistics statistics, Azure.AI.TextAnalytics.PiiEntityCollection entities) { throw null; } @@ -1084,7 +1112,11 @@ public static partial class TextAnalyticsModelFactory public static Azure.AI.TextAnalytics.SentenceSentiment SentenceSentiment(Azure.AI.TextAnalytics.TextSentiment sentiment, string text, double positiveScore, double neutralScore, double negativeScore) { throw null; } public static Azure.AI.TextAnalytics.SentenceSentiment SentenceSentiment(Azure.AI.TextAnalytics.TextSentiment sentiment, string text, double positiveScore, double neutralScore, double negativeScore, int offset, int length, System.Collections.Generic.IEnumerable opinions) { throw null; } public static Azure.AI.TextAnalytics.SentimentConfidenceScores SentimentConfidenceScores(double positiveScore, double neutralScore, double negativeScore) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.AI.TextAnalytics.SingleCategoryClassifyActionResult SingleCategoryClassifyActionResult(Azure.AI.TextAnalytics.SingleCategoryClassifyResultCollection result, System.DateTimeOffset completedOn) { throw null; } public static Azure.AI.TextAnalytics.SingleCategoryClassifyActionResult SingleCategoryClassifyActionResult(Azure.AI.TextAnalytics.SingleCategoryClassifyResultCollection result, string actionName, System.DateTimeOffset completedOn) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.AI.TextAnalytics.SingleCategoryClassifyActionResult SingleCategoryClassifyActionResult(System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.SingleCategoryClassifyActionResult SingleCategoryClassifyActionResult(string actionName, System.DateTimeOffset completedOn, string code, string message) { throw null; } public static Azure.AI.TextAnalytics.SingleCategoryClassifyResult SingleCategoryClassifyResult(string id, Azure.AI.TextAnalytics.TextAnalyticsError error) { throw null; } public static Azure.AI.TextAnalytics.SingleCategoryClassifyResult SingleCategoryClassifyResult(string id, Azure.AI.TextAnalytics.TextDocumentStatistics statistics, Azure.AI.TextAnalytics.ClassificationCategory classification, System.Collections.Generic.IEnumerable warnings = null) { throw null; } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsModelFactoryTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsModelFactoryTests.cs index ee09ff40fba1..3b02266ee5fc 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsModelFactoryTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/TextAnalyticsModelFactoryTests.cs @@ -108,32 +108,32 @@ public void AnalyzeActionsResult() { var extractKeyPhrasesActionResults = new List() { - TextAnalyticsModelFactory.ExtractKeyPhrasesActionResult(default, default, default), - TextAnalyticsModelFactory.ExtractKeyPhrasesActionResult(default, default, default) + TextAnalyticsModelFactory.ExtractKeyPhrasesActionResult(default, default), + TextAnalyticsModelFactory.ExtractKeyPhrasesActionResult(default, default) }; var recognizeEntitiesActionResults = new List() { - TextAnalyticsModelFactory.RecognizeEntitiesActionResult(default, default, default), - TextAnalyticsModelFactory.RecognizeEntitiesActionResult(default, default, default) + TextAnalyticsModelFactory.RecognizeEntitiesActionResult(default, default), + TextAnalyticsModelFactory.RecognizeEntitiesActionResult(default, default) }; var recognizePiiEntitiesActionResults = new List() { - TextAnalyticsModelFactory.RecognizePiiEntitiesActionResult(default, default, default), - TextAnalyticsModelFactory.RecognizePiiEntitiesActionResult(default, default, default) + TextAnalyticsModelFactory.RecognizePiiEntitiesActionResult(default, default), + TextAnalyticsModelFactory.RecognizePiiEntitiesActionResult(default, default) }; var recognizeLinkedEntitiesActionResults = new List() { - TextAnalyticsModelFactory.RecognizeLinkedEntitiesActionResult(default, default, default), - TextAnalyticsModelFactory.RecognizeLinkedEntitiesActionResult(default, default, default) + TextAnalyticsModelFactory.RecognizeLinkedEntitiesActionResult(default, default), + TextAnalyticsModelFactory.RecognizeLinkedEntitiesActionResult(default, default) }; var analyzeSentimentActionResults = new List() { - TextAnalyticsModelFactory.AnalyzeSentimentActionResult(default, default, default), - TextAnalyticsModelFactory.AnalyzeSentimentActionResult(default, default, default) + TextAnalyticsModelFactory.AnalyzeSentimentActionResult(default, default), + TextAnalyticsModelFactory.AnalyzeSentimentActionResult(default, default) }; var recognizeCustomEntitiesActionResults = new List() @@ -144,14 +144,14 @@ public void AnalyzeActionsResult() var singleCategoryClassifyActionResults = new List() { - TextAnalyticsModelFactory.SingleCategoryClassifyActionResult(default, default, default), - TextAnalyticsModelFactory.SingleCategoryClassifyActionResult(default, default, default) + TextAnalyticsModelFactory.SingleCategoryClassifyActionResult(default, default), + TextAnalyticsModelFactory.SingleCategoryClassifyActionResult(default, default) }; var multiCategoryClassifyActionResults = new List() { - TextAnalyticsModelFactory.MultiCategoryClassifyActionResult(default, default, default), - TextAnalyticsModelFactory.MultiCategoryClassifyActionResult(default, default, default) + TextAnalyticsModelFactory.MultiCategoryClassifyActionResult(default, default), + TextAnalyticsModelFactory.MultiCategoryClassifyActionResult(default, default) }; var actionsResult = TextAnalyticsModelFactory.AnalyzeActionsResult( @@ -170,8 +170,8 @@ public void AnalyzeActionsResult() var extractSummaryActionResults = new List() { - TextAnalyticsModelFactory.ExtractSummaryActionResult(default, default, default), - TextAnalyticsModelFactory.ExtractSummaryActionResult(default, default, default) + TextAnalyticsModelFactory.ExtractSummaryActionResult(default, default), + TextAnalyticsModelFactory.ExtractSummaryActionResult(default, default) }; actionsResult = TextAnalyticsModelFactory.AnalyzeActionsResult( From 2472f5f0e221ab68ad5222aeedcc0d3f07f40f2a Mon Sep 17 00:00:00 2001 From: Salah Mostafa Date: Wed, 20 Oct 2021 01:24:13 +0200 Subject: [PATCH 07/16] rebased + added some more tests --- .../Azure.AI.TextAnalytics.netstandard2.0.cs | 7 +++ .../src/RecognizeCustomEntitiesAction.cs | 5 ++ .../RecognizeCustomEntitiesActionResult.cs | 8 +-- .../src/TextAnalyticsActions.cs | 9 --- .../src/TextAnalyticsClient.cs | 19 ------ .../src/TextAnalyticsModelFactory.cs | 62 +++++++++++++++++++ .../Azure.AI.TextAnalytics/src/Transforms.cs | 7 ++- .../tests/AnalyzeSentimentTests.cs | 37 +++++++++++ .../tests/ExtractKeyPhrasesTests.cs | 37 +++++++++++ .../tests/ExtractSummaryTests.cs | 37 +++++++++++ .../tests/MultiCategoryClassifyTests.cs | 1 - .../tests/RecognizeCustomEntitiesTests.cs | 37 +++++++++++ .../tests/RecognizeEntitiesTests.cs | 37 +++++++++++ .../tests/RecognizeLinkedEntitiesTests.cs | 37 +++++++++++ .../tests/RecognizePiiEntitiesTests.cs | 37 +++++++++++ .../tests/SingleCategoryClassifyTests.cs | 4 +- .../Sample9_RecognizeCustomEntities.cs | 1 + .../Sample9_RecognizeCustomEntitiesAsync.cs | 1 + ...ple9_RecognizeCustomEntitiesConvenience.cs | 1 + ...RecognizeCustomEntitiesConvenienceAsync.cs | 1 + 20 files changed, 348 insertions(+), 37 deletions(-) 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 78d4f90e43b5..a11497ae0b43 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 @@ -680,6 +680,7 @@ public enum PiiEntityDomain public partial class RecognizeCustomEntitiesAction { public RecognizeCustomEntitiesAction(string projectName, string deploymentName) { } + public string ActionName { get { throw null; } set { } } public string DeploymentName { get { throw null; } } public bool? DisableServiceLogs { get { throw null; } set { } } public string ProjectName { get { throw null; } } @@ -1081,6 +1082,12 @@ public static partial class TextAnalyticsModelFactory public static Azure.AI.TextAnalytics.PiiEntity PiiEntity(string text, string category, string subCategory, double score, int offset, int length) { throw null; } public static Azure.AI.TextAnalytics.PiiEntityCollection PiiEntityCollection(System.Collections.Generic.IEnumerable entities, string redactedText, System.Collections.Generic.IEnumerable warnings = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.AI.TextAnalytics.RecognizeCustomEntitiesActionResult RecognizeCustomEntitiesActionResult(Azure.AI.TextAnalytics.RecognizeCustomEntitiesResultCollection result, System.DateTimeOffset completedOn) { throw null; } + public static Azure.AI.TextAnalytics.RecognizeCustomEntitiesActionResult RecognizeCustomEntitiesActionResult(Azure.AI.TextAnalytics.RecognizeCustomEntitiesResultCollection result, string actionName, System.DateTimeOffset completedOn) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.AI.TextAnalytics.RecognizeCustomEntitiesActionResult RecognizeCustomEntitiesActionResult(System.DateTimeOffset completedOn, string code, string message) { throw null; } + public static Azure.AI.TextAnalytics.RecognizeCustomEntitiesActionResult RecognizeCustomEntitiesActionResult(string actionName, System.DateTimeOffset completedOn, string code, string message) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.AI.TextAnalytics.RecognizeEntitiesActionResult RecognizeEntitiesActionResult(Azure.AI.TextAnalytics.RecognizeEntitiesResultCollection result, System.DateTimeOffset completedOn) { throw null; } public static Azure.AI.TextAnalytics.RecognizeEntitiesActionResult RecognizeEntitiesActionResult(Azure.AI.TextAnalytics.RecognizeEntitiesResultCollection result, string actionName, System.DateTimeOffset completedOn) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeCustomEntitiesAction.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeCustomEntitiesAction.cs index 5c2e71049770..580d75a86496 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeCustomEntitiesAction.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeCustomEntitiesAction.cs @@ -43,5 +43,10 @@ public RecognizeCustomEntitiesAction(string projectName, string deploymentName) /// /// public bool? DisableServiceLogs { get; set; } + + /// + /// Gets or sets a name for this action. If not provided, the service will generate one. + /// + public string ActionName { get; set; } } } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeCustomEntitiesActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeCustomEntitiesActionResult.cs index 6b1a93ff1182..d9c93f3491e5 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeCustomEntitiesActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeCustomEntitiesActionResult.cs @@ -16,8 +16,8 @@ public class RecognizeCustomEntitiesActionResult : TextAnalyticsActionResult /// /// Successful action. /// - internal RecognizeCustomEntitiesActionResult(RecognizeCustomEntitiesResultCollection result, DateTimeOffset completedOn) - : base(completedOn) + internal RecognizeCustomEntitiesActionResult(RecognizeCustomEntitiesResultCollection result, string actionName, DateTimeOffset completedOn) + : base(completedOn, actionName) { _documentsResults = result; } @@ -25,8 +25,8 @@ internal RecognizeCustomEntitiesActionResult(RecognizeCustomEntitiesResultCollec /// /// Action with an error. /// - internal RecognizeCustomEntitiesActionResult(DateTimeOffset completedOn, TextAnalyticsErrorInternal error) - : base(completedOn, error) { } + internal RecognizeCustomEntitiesActionResult(DateTimeOffset completedOn, string actionName, TextAnalyticsErrorInternal error) + : base(completedOn, actionName, error) { } /// /// Gets the result of the execution of a per each input document. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActions.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActions.cs index 11cdced0ab7c..b045e6095cd6 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActions.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActions.cs @@ -24,37 +24,31 @@ public TextAnalyticsActions() /// /// The set of that will get executed on the input documents. - /// Note that currently only one is supported. /// public IReadOnlyCollection ExtractKeyPhrasesActions { get; set; } /// /// The set of that will get executed on the input documents. - /// Note that currently only one is supported. /// public IReadOnlyCollection RecognizeEntitiesActions { get; set; } /// /// The set of that will get executed on the input documents. - /// Note that currently only one is supported. /// public IReadOnlyCollection RecognizePiiEntitiesActions { get; set; } /// /// The set of that will get executed on the input documents. - /// Note that currently only one is supported. /// public IReadOnlyCollection RecognizeLinkedEntitiesActions { get; set; } /// /// The set of that will get executed on the input documents. - /// Note that currently only one is supported. /// public IReadOnlyCollection AnalyzeSentimentActions { get; set; } /// /// The set of that will get executed on the input documents. - /// Note that currently only one is supported. /// /// /// This property only applies for and up. @@ -63,7 +57,6 @@ public TextAnalyticsActions() /// /// The set of that will get executed on the input documents. - /// Note that currently only one is supported. /// /// /// This property only applies for and up. @@ -72,7 +65,6 @@ public TextAnalyticsActions() /// /// The set of that will get executed on the input documents. - /// Note that currently only one is supported. /// /// /// This property only applies for and up. @@ -81,7 +73,6 @@ public TextAnalyticsActions() /// /// The set of that will get executed on the input documents. - /// Note that currently only one is supported. /// /// /// This property only applies for and up. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClient.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClient.cs index f3d8b37fbb65..c9237b22f20b 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClient.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsClient.cs @@ -2396,7 +2396,6 @@ public virtual async Task StartAnalyzeActionsAsync(IEnu private AnalyzeActionsOperation StartAnalyzeActions(MultiLanguageBatchInput batchInput, TextAnalyticsActions actions, AnalyzeActionsOptions options = default, CancellationToken cancellationToken = default) { - ValidateActions(actions); options ??= new AnalyzeActionsOptions(); AnalyzeBatchInput analyzeDocumentInputs = new AnalyzeBatchInput(batchInput, CreateTasks(actions)) { DisplayName = actions.DisplayName }; @@ -2422,7 +2421,6 @@ private AnalyzeActionsOperation StartAnalyzeActions(MultiLanguageBatchInput batc private async Task StartAnalyzeActionsAsync(MultiLanguageBatchInput batchInput, TextAnalyticsActions actions, AnalyzeActionsOptions options = default, CancellationToken cancellationToken = default) { - ValidateActions(actions); options ??= new AnalyzeActionsOptions(); AnalyzeBatchInput analyzeDocumentInputs = new AnalyzeBatchInput(batchInput, CreateTasks(actions)) { DisplayName = actions.DisplayName }; @@ -2489,23 +2487,6 @@ private static JobManifestTasks CreateTasks(TextAnalyticsActions actions) return tasks; } - private static void ValidateActions(TextAnalyticsActions actions) - { - if (actions.RecognizePiiEntitiesActions?.Count > 1 || - actions.RecognizeEntitiesActions?.Count > 1 || - actions.RecognizeLinkedEntitiesActions?.Count > 1 || - actions.ExtractKeyPhrasesActions?.Count > 1 || - actions.AnalyzeSentimentActions?.Count > 1 || - actions.ExtractSummaryActions?.Count > 1 || - actions.RecognizeCustomEntitiesActions?.Count > 1 || - actions.SingleCategoryClassifyActions?.Count > 1 || - actions.MultiCategoryClassifyActions?.Count > 1 - ) - { - throw new ArgumentException("Multiple of the same action is not currently supported."); - } - } - #endregion #region Common diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs index b411420df1b2..4fb6a40392aa 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs @@ -942,6 +942,68 @@ public static ExtractSummaryActionResult ExtractSummaryActionResult( return new ExtractSummaryActionResult(completedOn, default, new TextAnalyticsErrorInternal(code, message)); } + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// Sets the property. + /// A new instance of for mocking purposes. + public static RecognizeCustomEntitiesActionResult RecognizeCustomEntitiesActionResult( + RecognizeCustomEntitiesResultCollection result, + string actionName, + DateTimeOffset completedOn) + { + return new RecognizeCustomEntitiesActionResult(result, actionName, completedOn); + } + + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// A new instance of for mocking purposes. + [EditorBrowsable(EditorBrowsableState.Never)] + public static RecognizeCustomEntitiesActionResult RecognizeCustomEntitiesActionResult( + RecognizeCustomEntitiesResultCollection result, + DateTimeOffset completedOn) + { + return new RecognizeCustomEntitiesActionResult(result, default, completedOn); + } + + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// Sets the property. + /// Sets the property. + /// A new instance of for mocking purposes. + public static RecognizeCustomEntitiesActionResult RecognizeCustomEntitiesActionResult( + string actionName, + DateTimeOffset completedOn, + string code, + string message) + { + return new RecognizeCustomEntitiesActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); + } + + /// + /// Initializes a new instance of for mocking purposes. + /// + /// Sets the property. + /// Sets the property. + /// Sets the property. + /// A new instance of for mocking purposes. + [EditorBrowsable(EditorBrowsableState.Never)] + public static RecognizeCustomEntitiesActionResult RecognizeCustomEntitiesActionResult( + DateTimeOffset completedOn, + string code, + string message) + { + return new RecognizeCustomEntitiesActionResult(completedOn, default, new TextAnalyticsErrorInternal(code, message)); + } + /// /// Initializes a new instance of for mocking purposes. /// diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs index 5f854408e111..f26eed43714d 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs @@ -533,7 +533,8 @@ internal static CustomEntitiesTask ConvertToCustomEntitiesTask(RecognizeCustomEn Parameters = new CustomEntitiesTaskParameters(action.ProjectName, action.DeploymentName) { LoggingOptOut = action.DisableServiceLogs, - } + }, + TaskName = action.ActionName }; } @@ -930,11 +931,11 @@ private static IReadOnlyCollection ConvertT if (taskError != null) { - collection.Add(new RecognizeCustomEntitiesActionResult(task.LastUpdateDateTime, taskError)); + collection.Add(new RecognizeCustomEntitiesActionResult(task.LastUpdateDateTime, task.TaskName, taskError)); } else { - collection.Add(new RecognizeCustomEntitiesActionResult(ConvertToRecognizeCustomEntitiesResultCollection(task.Results, idToIndexMap), task.LastUpdateDateTime)); + collection.Add(new RecognizeCustomEntitiesActionResult(ConvertToRecognizeCustomEntitiesResultCollection(task.Results, idToIndexMap), task.TaskName, task.LastUpdateDateTime)); } index++; } diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeSentimentTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeSentimentTests.cs index 0e7f880e2f27..dee33c14dd23 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeSentimentTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeSentimentTests.cs @@ -434,6 +434,43 @@ public async Task AnalyzeSentimentBatchWithNullTextTest() Assert.AreEqual(exceptionMessage, ex.Message); } + [RecordedTest] + public async Task AnalyzeSentimentWithMultipleActions() + { + TextAnalyticsClient client = GetClient(); + + TextAnalyticsActions batchActions = new TextAnalyticsActions() + { + AnalyzeSentimentActions = new List() + { + new AnalyzeSentimentAction() + { + DisableServiceLogs = true, + ActionName = "AnalyzeSentimentWithDisabledServiceLogs" + }, + new AnalyzeSentimentAction() + { + ActionName = "AnalyzeSentiment" + } + } + }; + + AnalyzeActionsOperation operation = await client.StartAnalyzeActionsAsync(batchConvenienceDocuments, batchActions); + + await operation.WaitForCompletionAsync(); + + // Take the first page + AnalyzeActionsResult resultCollection = operation.Value.ToEnumerableAsync().Result.FirstOrDefault(); + + IReadOnlyCollection AnalyzeSentimentActionsResults = resultCollection.AnalyzeSentimentResults; + + Assert.IsNotNull(AnalyzeSentimentActionsResults); + Assert.AreEqual(2, AnalyzeSentimentActionsResults.Count); + + Assert.AreEqual("AnalyzeSentimentWithDisabledServiceLogs", AnalyzeSentimentActionsResults.ElementAt(0).ActionName); + Assert.AreEqual("AnalyzeSentiment", AnalyzeSentimentActionsResults.ElementAt(1).ActionName); + } + private void CheckAnalyzeSentimentProperties(DocumentSentiment doc, bool opinionMining = false) { Assert.IsNotNull(doc.ConfidenceScores.Positive); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/ExtractKeyPhrasesTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/ExtractKeyPhrasesTests.cs index 726dc5418bcf..96c33ccb9a79 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/ExtractKeyPhrasesTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/ExtractKeyPhrasesTests.cs @@ -197,6 +197,43 @@ public async Task ExtractKeyPhrasesBatchWithNullTextTest() Assert.AreEqual(exceptionMessage, ex.Message); } + [RecordedTest] + public async Task ExtractKeyPhrasesWithMultipleActions() + { + TextAnalyticsClient client = GetClient(); + + TextAnalyticsActions batchActions = new TextAnalyticsActions() + { + ExtractKeyPhrasesActions = new List() + { + new ExtractKeyPhrasesAction() + { + DisableServiceLogs = true, + ActionName = "ExtractKeyPhrasesWithDisabledServiceLogs" + }, + new ExtractKeyPhrasesAction() + { + ActionName = "ExtractKeyPhrases" + } + } + }; + + AnalyzeActionsOperation operation = await client.StartAnalyzeActionsAsync(batchConvenienceDocuments, batchActions); + + await operation.WaitForCompletionAsync(); + + // Take the first page + AnalyzeActionsResult resultCollection = operation.Value.ToEnumerableAsync().Result.FirstOrDefault(); + + IReadOnlyCollection ExtractKeyPhrasesActionsResults = resultCollection.ExtractKeyPhrasesResults; + + Assert.IsNotNull(ExtractKeyPhrasesActionsResults); + Assert.AreEqual(2, ExtractKeyPhrasesActionsResults.Count); + + Assert.AreEqual("ExtractKeyPhrasesWithDisabledServiceLogs", ExtractKeyPhrasesActionsResults.ElementAt(0).ActionName); + Assert.AreEqual("ExtractKeyPhrases", ExtractKeyPhrasesActionsResults.ElementAt(1).ActionName); + } + private void ValidateInDocumenResult(KeyPhraseCollection keyPhrases, int minKeyPhrasesCount = default) { Assert.IsNotNull(keyPhrases.Warnings); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/ExtractSummaryTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/ExtractSummaryTests.cs index 927419b5c510..efff0f683bf9 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/ExtractSummaryTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/ExtractSummaryTests.cs @@ -275,6 +275,43 @@ public async Task ExtractSummaryBatchWithStatisticsTest() ValidateSummaryBatchResult(summaryDocumentsResults, includeStatistics: true); } + [RecordedTest] + public async Task ExtractSummaryWithMultipleActions() + { + TextAnalyticsClient client = GetClient(); + + TextAnalyticsActions batchActions = new TextAnalyticsActions() + { + ExtractSummaryActions = new List() + { + new ExtractSummaryAction() + { + DisableServiceLogs = true, + ActionName = "ExtractSummaryWithDisabledServiceLogs" + }, + new ExtractSummaryAction() + { + ActionName = "ExtractSummary" + } + } + }; + + AnalyzeActionsOperation operation = await client.StartAnalyzeActionsAsync(s_extractSummaryBatchDocuments, batchActions); + + await operation.WaitForCompletionAsync(); + + // Take the first page + AnalyzeActionsResult resultCollection = operation.Value.ToEnumerableAsync().Result.FirstOrDefault(); + + IReadOnlyCollection ExtractSummaryActionsResults = resultCollection.ExtractSummaryResults; + + Assert.IsNotNull(ExtractSummaryActionsResults); + Assert.AreEqual(2, ExtractSummaryActionsResults.Count); + + Assert.AreEqual("ExtractSummaryWithDisabledServiceLogs", ExtractSummaryActionsResults.ElementAt(0).ActionName); + Assert.AreEqual("ExtractSummary", ExtractSummaryActionsResults.ElementAt(1).ActionName); + } + private void ValidateSummaryDocumentResult(SummarySentenceCollection sentences, SummarySentencesOrder expectedOrder) { Assert.IsNotNull(sentences.Warnings); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/MultiCategoryClassifyTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/MultiCategoryClassifyTests.cs index 8f0bfcecf8a2..66d4d42f8185 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/MultiCategoryClassifyTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/MultiCategoryClassifyTests.cs @@ -244,7 +244,6 @@ public async Task MultiCategoryClassifyWithMultipleActions() Assert.IsNotNull(multiCategoryClassifyActionsResults); Assert.AreEqual(2, multiCategoryClassifyActionsResults.Count); - Assert.AreEqual(2, multiCategoryClassifyActionsResults.FirstOrDefault().DocumentsResults.Count); Assert.AreEqual("MultiCategoryClassifyWithDisabledServiceLogs", multiCategoryClassifyActionsResults.ElementAt(0).ActionName); Assert.AreEqual("MultiCategoryClassify", multiCategoryClassifyActionsResults.ElementAt(1).ActionName); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeCustomEntitiesTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeCustomEntitiesTests.cs index 3d1809516841..062ddb12f588 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeCustomEntitiesTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeCustomEntitiesTests.cs @@ -243,6 +243,43 @@ public void RecognizeCustomEntitiesBatchWithNullIdTest() Assert.AreEqual(TextAnalyticsErrorCode.InvalidDocument, ex.ErrorCode); } + [RecordedTest] + public async Task RecognizeCustomEntitiesWithMultipleActions() + { + TextAnalyticsClient client = GetClient(); + + TextAnalyticsActions batchActions = new TextAnalyticsActions() + { + RecognizeCustomEntitiesActions = new List() + { + new RecognizeCustomEntitiesAction(TestEnvironment.RecognizeCustomEntitiesProjectName, TestEnvironment.RecognizeCustomEntitiesDeploymentName) + { + DisableServiceLogs = true, + ActionName = "RecognizeCustomEntitiesWithDisabledServiceLogs" + }, + new RecognizeCustomEntitiesAction(TestEnvironment.RecognizeCustomEntitiesProjectName, TestEnvironment.RecognizeCustomEntitiesDeploymentName) + { + ActionName = "RecognizeCustomEntities" + } + } + }; + + AnalyzeActionsOperation operation = await client.StartAnalyzeActionsAsync(e_batchConvenienceDocuments, batchActions); + + await operation.WaitForCompletionAsync(); + + // Take the first page + AnalyzeActionsResult resultCollection = operation.Value.ToEnumerableAsync().Result.FirstOrDefault(); + + IReadOnlyCollection RecognizeCustomEntitiesActionsResults = resultCollection.RecognizeCustomEntitiesResults; + + Assert.IsNotNull(RecognizeCustomEntitiesActionsResults); + Assert.AreEqual(2, RecognizeCustomEntitiesActionsResults.Count); + + Assert.AreEqual("RecognizeCustomEntitiesWithDisabledServiceLogs", RecognizeCustomEntitiesActionsResults.ElementAt(0).ActionName); + Assert.AreEqual("RecognizeCustomEntities", RecognizeCustomEntitiesActionsResults.ElementAt(1).ActionName); + } + private RecognizeCustomEntitiesResultCollection ExtractDocumentsResultsFromResponse(AnalyzeActionsOperation analyzeActionOperation) { var resultCollection = analyzeActionOperation.Value.ToEnumerableAsync().Result.FirstOrDefault(); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeEntitiesTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeEntitiesTests.cs index 84cd1e6db0c1..13e7f0d654af 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeEntitiesTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeEntitiesTests.cs @@ -239,6 +239,43 @@ public async Task RecognizeEntitiesBatchWithNullTextTest() Assert.AreEqual(exceptionMessage, ex.Message); } + [RecordedTest] + public async Task RecognizeEntitiesWithMultipleActions() + { + TextAnalyticsClient client = GetClient(); + + TextAnalyticsActions batchActions = new TextAnalyticsActions() + { + RecognizeEntitiesActions = new List() + { + new RecognizeEntitiesAction() + { + DisableServiceLogs = true, + ActionName = "RecognizeEntitiesWithDisabledServiceLogs" + }, + new RecognizeEntitiesAction() + { + ActionName = "RecognizeEntities" + } + } + }; + + AnalyzeActionsOperation operation = await client.StartAnalyzeActionsAsync(s_batchDocuments, batchActions); + + await operation.WaitForCompletionAsync(); + + // Take the first page + AnalyzeActionsResult resultCollection = operation.Value.ToEnumerableAsync().Result.FirstOrDefault(); + + IReadOnlyCollection RecognizeEntitiesActionsResults = resultCollection.RecognizeEntitiesResults; + + Assert.IsNotNull(RecognizeEntitiesActionsResults); + Assert.AreEqual(2, RecognizeEntitiesActionsResults.Count); + + Assert.AreEqual("RecognizeEntitiesWithDisabledServiceLogs", RecognizeEntitiesActionsResults.ElementAt(0).ActionName); + Assert.AreEqual("RecognizeEntities", RecognizeEntitiesActionsResults.ElementAt(1).ActionName); + } + private void ValidateInDocumenResult(CategorizedEntityCollection entities, List minimumExpectedOutput) { Assert.IsNotNull(entities.Warnings); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeLinkedEntitiesTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeLinkedEntitiesTests.cs index 6999f0d180eb..97dafc752bb7 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeLinkedEntitiesTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeLinkedEntitiesTests.cs @@ -215,6 +215,43 @@ public async Task RecognizeLinkedEntitiesBatchWithNullTextTest() Assert.AreEqual(exceptionMessage, ex.Message); } + [RecordedTest] + public async Task RecognizeLinkedEntitiesWithMultipleActions() + { + TextAnalyticsClient client = GetClient(); + + TextAnalyticsActions batchActions = new TextAnalyticsActions() + { + RecognizeLinkedEntitiesActions = new List() + { + new RecognizeLinkedEntitiesAction() + { + DisableServiceLogs = true, + ActionName = "RecognizeLinkedEntitiesWithDisabledServiceLogs" + }, + new RecognizeLinkedEntitiesAction() + { + ActionName = "RecognizeLinkedEntities" + } + } + }; + + AnalyzeActionsOperation operation = await client.StartAnalyzeActionsAsync(s_batchDocuments, batchActions); + + await operation.WaitForCompletionAsync(); + + // Take the first page + AnalyzeActionsResult resultCollection = operation.Value.ToEnumerableAsync().Result.FirstOrDefault(); + + IReadOnlyCollection RecognizeLinkedEntitiesActionsResults = resultCollection.RecognizeLinkedEntitiesResults; + + Assert.IsNotNull(RecognizeLinkedEntitiesActionsResults); + Assert.AreEqual(2, RecognizeLinkedEntitiesActionsResults.Count); + + Assert.AreEqual("RecognizeLinkedEntitiesWithDisabledServiceLogs", RecognizeLinkedEntitiesActionsResults.ElementAt(0).ActionName); + Assert.AreEqual("RecognizeLinkedEntities", RecognizeLinkedEntitiesActionsResults.ElementAt(1).ActionName); + } + private void ValidateInDocumenResult(LinkedEntityCollection entities, List minimumExpectedOutput) { Assert.IsNotNull(entities.Warnings); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizePiiEntitiesTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizePiiEntitiesTests.cs index c0a9c22a0b74..02bbacc8bb66 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizePiiEntitiesTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizePiiEntitiesTests.cs @@ -237,6 +237,43 @@ public async Task RecognizePiiEntitiesBatchWitCategoryTest() ValidateBatchDocumentsResult(results, expectedOutput); } + [RecordedTest] + public async Task RecognizePiiEntitiesWithMultipleActions() + { + TextAnalyticsClient client = GetClient(); + + TextAnalyticsActions batchActions = new TextAnalyticsActions() + { + RecognizePiiEntitiesActions = new List() + { + new RecognizePiiEntitiesAction() + { + DisableServiceLogs = true, + ActionName = "RecognizePiiEntitiesWithDisabledServiceLogs" + }, + new RecognizePiiEntitiesAction() + { + ActionName = "RecognizePiiEntities" + } + } + }; + + AnalyzeActionsOperation operation = await client.StartAnalyzeActionsAsync(s_batchDocuments, batchActions); + + await operation.WaitForCompletionAsync(); + + // Take the first page + AnalyzeActionsResult resultCollection = operation.Value.ToEnumerableAsync().Result.FirstOrDefault(); + + IReadOnlyCollection RecognizePiiEntitiesActionsResults = resultCollection.RecognizePiiEntitiesResults; + + Assert.IsNotNull(RecognizePiiEntitiesActionsResults); + Assert.AreEqual(2, RecognizePiiEntitiesActionsResults.Count); + + Assert.AreEqual("RecognizePiiEntitiesWithDisabledServiceLogs", RecognizePiiEntitiesActionsResults.ElementAt(0).ActionName); + Assert.AreEqual("RecognizePiiEntities", RecognizePiiEntitiesActionsResults.ElementAt(1).ActionName); + } + private void ValidateInDocumenResult(PiiEntityCollection entities, List minimumExpectedOutput) { Assert.IsNotNull(entities.Warnings); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SingleCategoryClassifyTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SingleCategoryClassifyTests.cs index 7e2ab163bc7b..af6957e247ae 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SingleCategoryClassifyTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SingleCategoryClassifyTests.cs @@ -243,7 +243,9 @@ public async Task SingleCategoryClassifyWithMultipleActions() Assert.IsNotNull(singleCategoryClassifyActionsResults); Assert.AreEqual(2, singleCategoryClassifyActionsResults.Count); - Assert.AreEqual(2, singleCategoryClassifyActionsResults.FirstOrDefault().DocumentsResults.Count); + + Assert.AreEqual("SingleCategoryClassifyWithDisabledServiceLogs", singleCategoryClassifyActionsResults.ElementAt(0).ActionName); + Assert.AreEqual("SingleCategoryClassify", singleCategoryClassifyActionsResults.ElementAt(1).ActionName); } private void ValidateSummaryDocumentResult(ClassificationCategory classification) { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample9_RecognizeCustomEntities.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample9_RecognizeCustomEntities.cs index 02ac498b1540..058147cd6499 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample9_RecognizeCustomEntities.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample9_RecognizeCustomEntities.cs @@ -84,6 +84,7 @@ has stretched the staff of the BLM to a point that it has been unable to meet it IReadOnlyCollection customEntitiesActionResults = documentsInPage.RecognizeCustomEntitiesResults; foreach (RecognizeCustomEntitiesActionResult customEntitiesActionResult in customEntitiesActionResults) { + Console.WriteLine($" Action name: {customEntitiesActionResult.ActionName}"); int docNumber = 1; foreach (RecognizeEntitiesResult documentResults in customEntitiesActionResult.DocumentsResults) { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample9_RecognizeCustomEntitiesAsync.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample9_RecognizeCustomEntitiesAsync.cs index 12786cb975e5..a32f9ead23f3 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample9_RecognizeCustomEntitiesAsync.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample9_RecognizeCustomEntitiesAsync.cs @@ -88,6 +88,7 @@ We tried again today and it was amazing. Everyone in my family liked the trail a IReadOnlyCollection customEntitiesActionResults = documentsInPage.RecognizeCustomEntitiesResults; foreach (RecognizeCustomEntitiesActionResult customEntitiesActionResult in customEntitiesActionResults) { + Console.WriteLine($" Action name: {customEntitiesActionResult.ActionName}"); int docNumber = 1; foreach (RecognizeEntitiesResult documentResults in customEntitiesActionResult.DocumentsResults) { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample9_RecognizeCustomEntitiesConvenience.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample9_RecognizeCustomEntitiesConvenience.cs index 85904830e3e8..cae1807f58d3 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample9_RecognizeCustomEntitiesConvenience.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample9_RecognizeCustomEntitiesConvenience.cs @@ -79,6 +79,7 @@ We tried again today and it was amazing. Everyone in my family liked the trail a IReadOnlyCollection customEntitiesActionResults = documentsInPage.RecognizeCustomEntitiesResults; foreach (RecognizeCustomEntitiesActionResult customEntitiesActionResult in customEntitiesActionResults) { + Console.WriteLine($" Action name: {customEntitiesActionResult.ActionName}"); int docNumber = 1; foreach (RecognizeEntitiesResult documentResults in customEntitiesActionResult.DocumentsResults) { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample9_RecognizeCustomEntitiesConvenienceAsync.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample9_RecognizeCustomEntitiesConvenienceAsync.cs index 7c9ef55cd06e..cc0953c32001 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample9_RecognizeCustomEntitiesConvenienceAsync.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample9_RecognizeCustomEntitiesConvenienceAsync.cs @@ -54,6 +54,7 @@ We tried again today and it was amazing. Everyone in my family liked the trail a IReadOnlyCollection customEntitiesActionResults = documentsInPage.RecognizeCustomEntitiesResults; foreach (RecognizeCustomEntitiesActionResult customEntitiesActionResult in customEntitiesActionResults) { + Console.WriteLine($" Action name: {customEntitiesActionResult.ActionName}"); int docNumber = 1; foreach (RecognizeEntitiesResult documentResults in customEntitiesActionResult.DocumentsResults) { From 4de04d2adc195c7ad0f4eeab4c232d4cf2fc803c Mon Sep 17 00:00:00 2001 From: Salah Mostafa Date: Wed, 20 Oct 2021 01:31:32 +0200 Subject: [PATCH 08/16] deleted mock test --- .../tests/AnalyzeOperationMockTests.cs | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationMockTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationMockTests.cs index fc750d5784c2..3c840e27ba9f 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationMockTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationMockTests.cs @@ -272,32 +272,6 @@ public async Task AnalyzeOperationRecognizeCustomEntitiesWithDisableServiceLogs( var expectedContent = "loggingOptOut\":true"; Assert.AreEqual(expectedContent, logging); } - - public void AnalyzeOperationRecognizeCustomEntitiesWithTwoActions() - { - var mockResponse = new MockResponse(202); - mockResponse.AddHeader(new HttpHeader("Operation-Location", "something/jobs/2a96a91f-7edf-4931-a880-3fdee1d56f15")); - - var mockTransport = new MockTransport(new[] { mockResponse, mockResponse }); - var client = CreateTestClient(mockTransport); - - var documents = new List - { - "Elon Musk is the CEO of SpaceX and Tesla." - }; - - TextAnalyticsActions batchActions = new() - { - RecognizeCustomEntitiesActions = new List() - { - new RecognizeCustomEntitiesAction(FakeProjectName, FakeDeploymentName), - new RecognizeCustomEntitiesAction(FakeProjectName, FakeDeploymentName) - }, - }; - - ArgumentException ex = Assert.ThrowsAsync(async () => await client.StartAnalyzeActionsAsync(documents, batchActions)); - Assert.AreEqual("Multiple of the same action is not currently supported.", ex.Message); - } #endregion #region linked entities From 3ca40d1ef23088b7e349559428802e3d026cf6ff Mon Sep 17 00:00:00 2001 From: Salah Mostafa Date: Thu, 21 Oct 2021 22:44:06 +0200 Subject: [PATCH 09/16] Ran samples + generated snippets --- .../Azure.AI.TextAnalytics/README.md | 1 + .../Sample10_SingleCategoryClassify.md | 1 + .../Sample11_ClassifyCustomCategories.md | 1 + .../Sample9_RecognizeCustomEntities.md | 1 + .../samples/Sample_AnalyzeActions.md | 1 + .../ExtractKeyPhrasesWithMultipleActions.json | 407 ++++++ ...actKeyPhrasesWithMultipleActionsAsync.json | 510 +++++++ .../ExtractSummaryWithMultipleActions.json | 910 ++++++++++++ ...xtractSummaryWithMultipleActionsAsync.json | 716 ++++++++++ ...tiCategoryClassifyWithMultipleActions.json | 233 ++++ ...egoryClassifyWithMultipleActionsAsync.json | 197 +++ ...nizeCustomEntitiesWithMultipleActions.json | 325 +++++ ...ustomEntitiesWithMultipleActionsAsync.json | 253 ++++ .../RecognizeEntitiesWithMultipleActions.json | 554 ++++++++ ...gnizeEntitiesWithMultipleActionsAsync.json | 487 +++++++ ...nizeLinkedEntitiesWithMultipleActions.json | 824 +++++++++++ ...inkedEntitiesWithMultipleActionsAsync.json | 1220 +++++++++++++++++ ...cognizePiiEntitiesWithMultipleActions.json | 469 +++++++ ...zePiiEntitiesWithMultipleActionsAsync.json | 581 ++++++++ ...leCategoryClassifyWithMultipleActions.json | 199 +++ ...egoryClassifyWithMultipleActionsAsync.json | 235 ++++ 21 files changed, 8125 insertions(+) create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/ExtractKeyPhrasesTests/ExtractKeyPhrasesWithMultipleActions.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/ExtractKeyPhrasesTests/ExtractKeyPhrasesWithMultipleActionsAsync.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/ExtractSummaryTests/ExtractSummaryWithMultipleActions.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/ExtractSummaryTests/ExtractSummaryWithMultipleActionsAsync.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/MultiCategoryClassifyTests/MultiCategoryClassifyWithMultipleActions.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/MultiCategoryClassifyTests/MultiCategoryClassifyWithMultipleActionsAsync.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeCustomEntitiesTests/RecognizeCustomEntitiesWithMultipleActions.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeCustomEntitiesTests/RecognizeCustomEntitiesWithMultipleActionsAsync.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeEntitiesTests/RecognizeEntitiesWithMultipleActions.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeEntitiesTests/RecognizeEntitiesWithMultipleActionsAsync.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeLinkedEntitiesTests/RecognizeLinkedEntitiesWithMultipleActions.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeLinkedEntitiesTests/RecognizeLinkedEntitiesWithMultipleActionsAsync.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizePiiEntitiesTests/RecognizePiiEntitiesWithMultipleActions.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizePiiEntitiesTests/RecognizePiiEntitiesWithMultipleActionsAsync.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/SingleCategoryClassifyTests/SingleCategoryClassifyWithMultipleActions.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/SingleCategoryClassifyTests/SingleCategoryClassifyWithMultipleActionsAsync.json diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/README.md b/sdk/textanalytics/Azure.AI.TextAnalytics/README.md index 2ab16d697c80..9bb988d26a4b 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/README.md +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/README.md @@ -600,6 +600,7 @@ This functionality allows running multiple actions in one or more documents. Act int docNumber = 1; foreach (RecognizeEntitiesActionResult entitiesActionResults in entitiesResults) { + Console.WriteLine($" Action name: {entitiesActionResults.ActionName}"); foreach (RecognizeEntitiesResult documentResults in entitiesActionResults.DocumentsResults) { Console.WriteLine($" Document #{docNumber++}"); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample10_SingleCategoryClassify.md b/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample10_SingleCategoryClassify.md index b38e11c6859a..52867ee7a845 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample10_SingleCategoryClassify.md +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample10_SingleCategoryClassify.md @@ -70,6 +70,7 @@ await foreach (AnalyzeActionsResult documentsInPage in operation.Value) foreach (SingleCategoryClassifyActionResult classificationActionResults in singleClassificationActionResults) { + Console.WriteLine($" Action name: {classificationActionResults.ActionName}"); foreach (SingleCategoryClassifyResult documentResults in classificationActionResults.DocumentsResults) { Console.WriteLine($" Class category \"{documentResults.Classification.Category}\" predicted with a confidence score of {documentResults.Classification.ConfidenceScore}."); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample11_ClassifyCustomCategories.md b/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample11_ClassifyCustomCategories.md index e61c664fbd92..c5f5c2010c36 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample11_ClassifyCustomCategories.md +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample11_ClassifyCustomCategories.md @@ -70,6 +70,7 @@ await foreach (AnalyzeActionsResult documentsInPage in operation.Value) foreach (MultiCategoryClassifyActionResult classificationActionResults in multiClassificationActionResults) { + Console.WriteLine($" Action name: {classificationActionResults.ActionName}"); foreach (MultiCategoryClassifyResult documentResults in classificationActionResults.DocumentsResults) { if (documentResults.Classifications.Count > 0) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample9_RecognizeCustomEntities.md b/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample9_RecognizeCustomEntities.md index d1c4b9ac63dd..0d2a68f84d12 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample9_RecognizeCustomEntities.md +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample9_RecognizeCustomEntities.md @@ -78,6 +78,7 @@ await foreach (AnalyzeActionsResult documentsInPage in operation.Value) IReadOnlyCollection customEntitiesActionResults = documentsInPage.RecognizeCustomEntitiesResults; foreach (RecognizeCustomEntitiesActionResult customEntitiesActionResult in customEntitiesActionResults) { + Console.WriteLine($" Action name: {customEntitiesActionResult.ActionName}"); int docNumber = 1; foreach (RecognizeEntitiesResult documentResults in customEntitiesActionResult.DocumentsResults) { diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample_AnalyzeActions.md b/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample_AnalyzeActions.md index 278ccf665bb1..aa915bc5778f 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample_AnalyzeActions.md +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample_AnalyzeActions.md @@ -64,6 +64,7 @@ To run multiple actions in multiple documents, call `StartAnalyzeActionsAsync` o int docNumber = 1; foreach (RecognizeEntitiesActionResult entitiesActionResults in entitiesResults) { + Console.WriteLine($" Action name: {entitiesActionResults.ActionName}"); foreach (RecognizeEntitiesResult documentResults in entitiesActionResults.DocumentsResults) { Console.WriteLine($" Document #{docNumber++}"); diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/ExtractKeyPhrasesTests/ExtractKeyPhrasesWithMultipleActions.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/ExtractKeyPhrasesTests/ExtractKeyPhrasesWithMultipleActions.json new file mode 100644 index 000000000000..af4ec8ab8d0f --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/ExtractKeyPhrasesTests/ExtractKeyPhrasesWithMultipleActions.json @@ -0,0 +1,407 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Content-Length": "389", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-6cd7e6fc88ac914e8fac000d7f24a97a-eb2afb2ead770f40-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "f9fe92c25cc9e332abb31e6d62f326f5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "Microsoft was founded by Bill Gates and Paul Allen.", + "language": "en" + }, + { + "id": "1", + "text": "My cat and my dog might need to see a veterinarian.", + "language": "en" + } + ] + }, + "tasks": { + "keyPhraseExtractionTasks": [ + { + "parameters": { + "loggingOptOut": true + }, + "taskName": "ExtractKeyPhrasesWithDisabledServiceLogs" + }, + { + "parameters": {}, + "taskName": "ExtractKeyPhrases" + } + ] + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "c1b05b96-36a1-48d7-83a5-f84e41ca27fa", + "Date": "Wed, 20 Oct 2021 15:00:13 GMT", + "operation-location": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/6ae1ab6b-e446-470d-b9f5-58b86a85a92e", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "468" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/6ae1ab6b-e446-470d-b9f5-58b86a85a92e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "593e8a3c12521d4f48bb2223352ad499", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "081f63b9-cd56-44ea-b3c9-e72b00fbc422", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:00:13 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "6ae1ab6b-e446-470d-b9f5-58b86a85a92e", + "lastUpdateDateTime": "2021-10-20T15:00:14Z", + "createdDateTime": "2021-10-20T15:00:13Z", + "expirationDateTime": "2021-10-21T15:00:13Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/6ae1ab6b-e446-470d-b9f5-58b86a85a92e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "c7d6b6a6ce18aa9ea29c4fb7398199cc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "9100d407-6d21-458d-b53e-1e9952fb6aa3", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:00:15 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "9" + }, + "ResponseBody": { + "jobId": "6ae1ab6b-e446-470d-b9f5-58b86a85a92e", + "lastUpdateDateTime": "2021-10-20T15:00:14Z", + "createdDateTime": "2021-10-20T15:00:13Z", + "expirationDateTime": "2021-10-21T15:00:13Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/6ae1ab6b-e446-470d-b9f5-58b86a85a92e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "0db008fa0f80b0ec42e1b00d390ead81", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "e888d3b2-c00f-4c10-8c51-de1109ef4bc0", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:00:16 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "6ae1ab6b-e446-470d-b9f5-58b86a85a92e", + "lastUpdateDateTime": "2021-10-20T15:00:14Z", + "createdDateTime": "2021-10-20T15:00:13Z", + "expirationDateTime": "2021-10-21T15:00:13Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/6ae1ab6b-e446-470d-b9f5-58b86a85a92e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "abc785df5e1d6dddec93b6b6c298e3c7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "0d92e39c-8cf6-4b2c-848b-19ae7c0d5595", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:00:17 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "9" + }, + "ResponseBody": { + "jobId": "6ae1ab6b-e446-470d-b9f5-58b86a85a92e", + "lastUpdateDateTime": "2021-10-20T15:00:14Z", + "createdDateTime": "2021-10-20T15:00:13Z", + "expirationDateTime": "2021-10-21T15:00:13Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/6ae1ab6b-e446-470d-b9f5-58b86a85a92e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "2d285621c6799618ca2585361e907193", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "6d08436b-9dc2-43b6-961f-504f3a9953df", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:00:18 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "7" + }, + "ResponseBody": { + "jobId": "6ae1ab6b-e446-470d-b9f5-58b86a85a92e", + "lastUpdateDateTime": "2021-10-20T15:00:14Z", + "createdDateTime": "2021-10-20T15:00:13Z", + "expirationDateTime": "2021-10-21T15:00:13Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/6ae1ab6b-e446-470d-b9f5-58b86a85a92e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "b4d8ceeeedb99caf2b4321ed5836eeaa", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "efa477f4-8dad-44cf-aac6-b57b2a5cec01", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:00:20 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "201" + }, + "ResponseBody": { + "jobId": "6ae1ab6b-e446-470d-b9f5-58b86a85a92e", + "lastUpdateDateTime": "2021-10-20T15:00:19Z", + "createdDateTime": "2021-10-20T15:00:13Z", + "expirationDateTime": "2021-10-21T15:00:13Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "keyPhraseExtractionTasks": [ + { + "lastUpdateDateTime": "2021-10-20T15:00:19.81358Z", + "taskName": "ExtractKeyPhrases", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "keyPhrases": [ + "Bill Gates", + "Paul Allen", + "Microsoft" + ], + "warnings": [] + }, + { + "id": "1", + "keyPhrases": [ + "cat", + "dog", + "veterinarian" + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-06-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/6ae1ab6b-e446-470d-b9f5-58b86a85a92e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "e3ebe9fd80e618076c31e1f7d8a64f5b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "e33aaba1-ec38-4fed-831a-4f3d2c444c38", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:00:21 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "194" + }, + "ResponseBody": { + "jobId": "6ae1ab6b-e446-470d-b9f5-58b86a85a92e", + "lastUpdateDateTime": "2021-10-20T15:00:22Z", + "createdDateTime": "2021-10-20T15:00:13Z", + "expirationDateTime": "2021-10-21T15:00:13Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 2, + "failed": 0, + "inProgress": 0, + "total": 2, + "keyPhraseExtractionTasks": [ + { + "lastUpdateDateTime": "2021-10-20T15:00:22.1399452Z", + "taskName": "ExtractKeyPhrasesWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "keyPhrases": [ + "Bill Gates", + "Paul Allen", + "Microsoft" + ], + "warnings": [] + }, + { + "id": "1", + "keyPhrases": [ + "cat", + "dog", + "veterinarian" + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-06-01" + } + }, + { + "lastUpdateDateTime": "2021-10-20T15:00:19.81358Z", + "taskName": "ExtractKeyPhrases", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "keyPhrases": [ + "Bill Gates", + "Paul Allen", + "Microsoft" + ], + "warnings": [] + }, + { + "id": "1", + "keyPhrases": [ + "cat", + "dog", + "veterinarian" + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-06-01" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "512449481", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticstestresources.cognitiveservices.azure.com/" + } +} \ No newline at end of file diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/ExtractKeyPhrasesTests/ExtractKeyPhrasesWithMultipleActionsAsync.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/ExtractKeyPhrasesTests/ExtractKeyPhrasesWithMultipleActionsAsync.json new file mode 100644 index 000000000000..a7a9db686299 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/ExtractKeyPhrasesTests/ExtractKeyPhrasesWithMultipleActionsAsync.json @@ -0,0 +1,510 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Content-Length": "389", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-e5099e7612b9d947b1b8024a4c10b5f5-a0ae805d20b0c24c-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "3e804ae24ddafd4e332414fdc826fccc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "Microsoft was founded by Bill Gates and Paul Allen.", + "language": "en" + }, + { + "id": "1", + "text": "My cat and my dog might need to see a veterinarian.", + "language": "en" + } + ] + }, + "tasks": { + "keyPhraseExtractionTasks": [ + { + "parameters": { + "loggingOptOut": true + }, + "taskName": "ExtractKeyPhrasesWithDisabledServiceLogs" + }, + { + "parameters": {}, + "taskName": "ExtractKeyPhrases" + } + ] + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "a292fabf-49bc-4ea0-98f0-64e2383bc1fe", + "Date": "Wed, 20 Oct 2021 15:00:22 GMT", + "operation-location": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/77e3608d-e370-4a66-9141-10f142fe7cd5", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "328" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/77e3608d-e370-4a66-9141-10f142fe7cd5", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "ed609702e874cbd93fd246e6fa53645a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "93f3b086-7a54-46c2-baea-8cd799d2b126", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:00:24 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "18" + }, + "ResponseBody": { + "jobId": "77e3608d-e370-4a66-9141-10f142fe7cd5", + "lastUpdateDateTime": "2021-10-20T15:00:23Z", + "createdDateTime": "2021-10-20T15:00:23Z", + "expirationDateTime": "2021-10-21T15:00:23Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/77e3608d-e370-4a66-9141-10f142fe7cd5", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "bb70e0500624b1179876a86fb55e7e34", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "aedf3ce5-54de-47ea-8474-11ff566afe93", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:00:25 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "7" + }, + "ResponseBody": { + "jobId": "77e3608d-e370-4a66-9141-10f142fe7cd5", + "lastUpdateDateTime": "2021-10-20T15:00:23Z", + "createdDateTime": "2021-10-20T15:00:23Z", + "expirationDateTime": "2021-10-21T15:00:23Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/77e3608d-e370-4a66-9141-10f142fe7cd5", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "b58f67e5092afa6870b5ff08076802e0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "32e15325-7332-46b1-985f-fa0cc6b6cb86", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:00:26 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "31" + }, + "ResponseBody": { + "jobId": "77e3608d-e370-4a66-9141-10f142fe7cd5", + "lastUpdateDateTime": "2021-10-20T15:00:23Z", + "createdDateTime": "2021-10-20T15:00:23Z", + "expirationDateTime": "2021-10-21T15:00:23Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/77e3608d-e370-4a66-9141-10f142fe7cd5", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "e7adbac041b5fca880ae54fd406916e0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "ca76417c-d0be-46f4-86d9-7af23be994e5", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:00:27 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "45" + }, + "ResponseBody": { + "jobId": "77e3608d-e370-4a66-9141-10f142fe7cd5", + "lastUpdateDateTime": "2021-10-20T15:00:23Z", + "createdDateTime": "2021-10-20T15:00:23Z", + "expirationDateTime": "2021-10-21T15:00:23Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/77e3608d-e370-4a66-9141-10f142fe7cd5", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "93001153afc3463077764a6f060faa30", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "ad7deba0-2157-4949-af3d-d98d6f523888", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:00:29 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "9" + }, + "ResponseBody": { + "jobId": "77e3608d-e370-4a66-9141-10f142fe7cd5", + "lastUpdateDateTime": "2021-10-20T15:00:23Z", + "createdDateTime": "2021-10-20T15:00:23Z", + "expirationDateTime": "2021-10-21T15:00:23Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/77e3608d-e370-4a66-9141-10f142fe7cd5", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "faafc77396b1a47ebf93347bb46bb906", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "9d2f9857-4c8f-41f2-a2e6-b23f3c53424c", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:00:30 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "77e3608d-e370-4a66-9141-10f142fe7cd5", + "lastUpdateDateTime": "2021-10-20T15:00:29Z", + "createdDateTime": "2021-10-20T15:00:23Z", + "expirationDateTime": "2021-10-21T15:00:23Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/77e3608d-e370-4a66-9141-10f142fe7cd5", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "f5b41f9f6f67101c8966703ff638f571", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "34de2bf2-bed5-44e7-ada2-27cae0e4463d", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:00:31 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "182" + }, + "ResponseBody": { + "jobId": "77e3608d-e370-4a66-9141-10f142fe7cd5", + "lastUpdateDateTime": "2021-10-20T15:00:31Z", + "createdDateTime": "2021-10-20T15:00:23Z", + "expirationDateTime": "2021-10-21T15:00:23Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "keyPhraseExtractionTasks": [ + { + "lastUpdateDateTime": "2021-10-20T15:00:31.1340971Z", + "taskName": "ExtractKeyPhrases", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "keyPhrases": [ + "Bill Gates", + "Paul Allen", + "Microsoft" + ], + "warnings": [] + }, + { + "id": "1", + "keyPhrases": [ + "cat", + "dog", + "veterinarian" + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-06-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/77e3608d-e370-4a66-9141-10f142fe7cd5", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "788924031bbabd2f925bd3307ab4920c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "99eb075a-dc31-44c9-98b1-24abb78fbbb4", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:00:33 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "83" + }, + "ResponseBody": { + "jobId": "77e3608d-e370-4a66-9141-10f142fe7cd5", + "lastUpdateDateTime": "2021-10-20T15:00:31Z", + "createdDateTime": "2021-10-20T15:00:23Z", + "expirationDateTime": "2021-10-21T15:00:23Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "keyPhraseExtractionTasks": [ + { + "lastUpdateDateTime": "2021-10-20T15:00:31.1340971Z", + "taskName": "ExtractKeyPhrases", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "keyPhrases": [ + "Bill Gates", + "Paul Allen", + "Microsoft" + ], + "warnings": [] + }, + { + "id": "1", + "keyPhrases": [ + "cat", + "dog", + "veterinarian" + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-06-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/77e3608d-e370-4a66-9141-10f142fe7cd5", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "e7d044bcb55a03c8aa9f704a263fae86", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "ebb41e92-7caa-4a8d-8772-000a7de0f84e", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:00:34 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "143" + }, + "ResponseBody": { + "jobId": "77e3608d-e370-4a66-9141-10f142fe7cd5", + "lastUpdateDateTime": "2021-10-20T15:00:33Z", + "createdDateTime": "2021-10-20T15:00:23Z", + "expirationDateTime": "2021-10-21T15:00:23Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 2, + "failed": 0, + "inProgress": 0, + "total": 2, + "keyPhraseExtractionTasks": [ + { + "lastUpdateDateTime": "2021-10-20T15:00:33.8561031Z", + "taskName": "ExtractKeyPhrasesWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "keyPhrases": [ + "Bill Gates", + "Paul Allen", + "Microsoft" + ], + "warnings": [] + }, + { + "id": "1", + "keyPhrases": [ + "cat", + "dog", + "veterinarian" + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-06-01" + } + }, + { + "lastUpdateDateTime": "2021-10-20T15:00:31.1340971Z", + "taskName": "ExtractKeyPhrases", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "keyPhrases": [ + "Bill Gates", + "Paul Allen", + "Microsoft" + ], + "warnings": [] + }, + { + "id": "1", + "keyPhrases": [ + "cat", + "dog", + "veterinarian" + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-06-01" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "1655572524", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticstestresources.cognitiveservices.azure.com/" + } +} \ No newline at end of file diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/ExtractSummaryTests/ExtractSummaryWithMultipleActions.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/ExtractSummaryTests/ExtractSummaryWithMultipleActions.json new file mode 100644 index 000000000000..f8e64826ea7b --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/ExtractSummaryTests/ExtractSummaryWithMultipleActions.json @@ -0,0 +1,910 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Content-Length": "11039", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-702354d21afb4d40b07a869475488b7d-896187420b2e294f-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "2e73b90435cce70b2e4922f1ab54c953", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "1", + "text": "No roads or rails connect the 39,000 people dispersed across Nunavut, a territory in northeastern Canada that spans three time zones and features fjord-cut isles that stretch into the Arctic Circle off the west coast of Greenland. About 80% of the population is of Inuit descent with cultural ties to the land that date back more than 4,000 years. Today, low-bandwidth satellite internet service links the people of Nunavut to each other and with the rest of the world. The Government of Nunavut relies on this internet link to provide healthcare, education, housing and family, and financial and other services to 25 communities. The smallest, Grise Fiord, has a population of 130; the largest, the capital, Iqaluit, has 8,500 people. About 3,100 people work full-time for the government, which has an office in each community. Another 3,000 people work for the government as relief workers, casual, term or contractors. Managing information technology for this dispersed and elastic workforce is a constant challenge for Martin Joy, director of information communication and technology for the Government of Nunavut. \u201CTraditionally, in IT, you would have to send a device or mail a device to that end user. In Nunavut, there is no road, there is no logistical framework that allows us to move stuff cost-effectively, so everything has to be flown,\u201D he explained. \u201CBased on weather, based on the types of cargo flows, that could take a considerable amount of time. It could take two to three weeks for us to get a user a device to get them onboarded securely into our environment.\u201D \u201CNow, with Windows 365, we can do that within less than an hour of the account being created,\u201D he said. Windows 365 puts Microsoft\u2019s flagship operating system in the cloud. Users select Windows 10 or Windows 11, once it is generally available later this calendar year, along with a configuration of processing power, storage and memory that suits their needs. They then access their Cloud PC through a native application or web browser on any device, from anywhere with an internet connection. The creation of the Cloud PC follows other products and services to the cloud, from Windows Server on Azure to the suite of Microsoft Office productivity applications in Microsoft 365. Windows is already accessible in the cloud via Azure Virtual Desktop, which offers customers flexibility to create and run their own virtualization service. Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy for today\u2019s login-from-anywhere, mobile and elastic workforces. \u201CWindows 365 is really going to make a huge difference for organizations that wanted to try virtualization for various reasons but could not \u2013 maybe it was too costly, too complex or they didn\u2019t have the expertise in house to do it,\u201D said Wangui McKelvey, general manager of Microsoft 365, who works from a home office in Atlanta, Georgia. With Windows 365, she added, IT admins can manage and deploy Cloud PCs using the same tools they use today to manage physical PCs. The remote and hybrid workforces of today and tomorrow were top of mind for Scott Manchester when he set out to develop Windows 365. The director of program management for Windows 365 in Redmond, Washington, wanted to deliver an experience with the look, feel and security of a traditional Windows PC, only accessed through a native app or web browser on a device of the user\u2019s choosing from anywhere with an internet connection. \u201CYou want them to be able to get access to their corporate resources, applications, databases and HR tools, and do all the things they do in a typical workday sitting in the office \u2013 you want them to have that same experience,\u201D he said. \u201CAnd you want them to have that experience in such a way that it feels familiar to them. It\u2019s not this jolting thing that takes away all the things they love about Windows.\u201D Virtualization, he noted, can be challenging to set up and maintain, especially for organizations without dedicated IT resources. IT consulting firms do brisk business working with companies to set up virtualization solutions and staffing help desks to field calls from employees when they run into complications. Manchester knows this because he worked on Microsoft\u2019s Windows virtualization technologies for nearly two decades prior to leading the development of Windows 365. The inspiration for Windows 365 came earlier, when he was assigned to an internal team at Microsoft working on a project, code named Arcadia, a consumer-facing service that would stream video games from the cloud. The target audience \u2013 gamers \u2013 lacks an IT department to lean on when things glitch. \u201CThat started me thinking, \u2018How do we build something that doesn\u2019t require IT intervention, something that could truly scale to the consumer market?\u2019\u201D Manchester said. The consumer experience was Manchester\u2019s benchmark when he started work on virtualization. \u201CI took note of every time there was something that didn\u2019t quite deliver on that,\u201D he said. \u201CAnd, as I started meeting with customers and partners and learning about how they fill in these gaps either by setting expectations of their workforce or having an IT department that picks up the phone and deals with those situations, I realized we had some ground to cover.\u201D Covering that ground led to improvements in Microsoft\u2019s business offering now known as Azure Virtual Desktop. This offering continues to experience accelerated growth among customers who need full customization and control over their operating environment and have the resources for dedicated IT staff to support the system, Manchester noted. Windows 365 is for the approximate 80% of the marketplace that lacks the need for full customization or the resources for dedicated IT. To lead the development of Windows 365, Manchester leaned into his Arcadia mindset. \u201CWhen we built this team, we brought in a couple of leaders who had experience with virtualization, but for the most part we brought in people who had experience with Windows and experience with consumer experiences because that was the bar we wanted to set,\u201D he said. Soon after this bar was set, and the first batch of hires made \u2013 a handful of experts in virtualization and user experience \u2013 COVID-19 hit and changed the world. \u201CWe hired everybody else during the pandemic,\u201D Manchester said. \u201CThey were remote. They were living all over the U.S., Australia, Europe and China. Many of them have never set foot in the office. And as soon as we got far enough along with the development, we moved those people to use the service. People who never used virtualization before, had no expectations \u2013 their bar was the experience they had on their laptop \u2013 and we basically used Windows 365 to build Windows 365.\u201D As the team used the service and encountered bugs in the system, they worked through and solved them on their way to creating a unique category of virtualization, the Cloud PC. \u201CWe\u2019re giving you Windows from the cloud,\u201D Manchester said.", + "language": "en" + }, + { + "id": "2", + "text": "Windows 365 was in the works before COVID-19 sent companies around the world on a scramble to secure solutions to support employees suddenly forced to work from home, but \u201Cwhat really put the firecracker behind it was the pandemic, it accelerated everything,\u201D McKelvey said. She explained that customers were asking, \u201C\u2019How do we create an experience for people that makes them still feel connected to the company without the physical presence of being there?\u201D In this new world of Windows 365, remote workers flip the lid on their laptop, bootup the family workstation or clip a keyboard onto a tablet, launch a native app or modern web browser and login to their Windows 365 account. From there, their Cloud PC appears with their background, apps, settings and content just as they left it when they last were last there \u2013 in the office, at home or a coffee shop. \u201CAnd then, when you\u2019re done, you\u2019re done. You won\u2019t have any issues around security because you\u2019re not saving anything on your device,\u201D McKelvey said, noting that all the data is stored in the cloud. The ability to login to a Cloud PC from anywhere on any device is part of Microsoft\u2019s larger strategy around tailoring products such as Microsoft Teams and Microsoft 365 for the post-pandemic hybrid workforce of the future, she added. It enables employees accustomed to working from home to continue working from home; it enables companies to hire interns from halfway around the world; it allows startups to scale without requiring IT expertise. \u201CI think this will be interesting for those organizations who, for whatever reason, have shied away from virtualization. This is giving them an opportunity to try it in a way that their regular, everyday endpoint admin could manage,\u201D McKelvey said. The simplicity of Windows 365 won over Dean Wells, the corporate chief information officer for the Government of Nunavut. His team previously attempted to deploy a traditional virtual desktop infrastructure and found it inefficient and unsustainable given the limitations of low-bandwidth satellite internet and the constant need for IT staff to manage the network and infrastructure. We didn\u2019t run it for very long,\u201D he said. \u201CIt didn\u2019t turn out the way we had hoped. So, we actually had terminated the project and rolled back out to just regular PCs.\u201D He re-evaluated this decision after the Government of Nunavut was hit by a ransomware attack in November 2019 that took down everything from the phone system to the government\u2019s servers. Microsoft helped rebuild the system, moving the government to Teams, SharePoint, OneDrive and Microsoft 365. Manchester\u2019s team recruited the Government of Nunavut to pilot Windows 365. Wells was intrigued, especially by the ability to manage the elastic workforce securely and seamlessly. \u201CThe impact that I believe we are finding, and the impact that we\u2019re going to find going forward, is being able to access specialists from outside the territory and organizations outside the territory to come in and help us with our projects, being able to get people on staff with us to help us deliver the day-to-day expertise that we need to run the government,\u201D he said. \u201CBeing able to improve healthcare, being able to improve education, economic development is going to improve the quality of life in the communities.\u201D", + "language": "en" + } + ] + }, + "tasks": { + "extractiveSummarizationTasks": [ + { + "parameters": { + "loggingOptOut": true, + "stringIndexType": "Utf16CodeUnit" + }, + "taskName": "ExtractSummaryWithDisabledServiceLogs" + }, + { + "parameters": { + "stringIndexType": "Utf16CodeUnit" + }, + "taskName": "ExtractSummary" + } + ] + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "0a400b8f-8317-4b89-8a50-3d7f1ebb852b", + "Date": "Wed, 20 Oct 2021 15:01:37 GMT", + "operation-location": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "470" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "4cd81395d120b81ebbcdb6ad5ac9adf7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "f8c73564-876c-405e-a12a-d545a8430192", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:01:37 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "lastUpdateDateTime": "2021-10-20T15:01:38Z", + "createdDateTime": "2021-10-20T15:01:37Z", + "expirationDateTime": "2021-10-21T15:01:37Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "806a4f5736b1b5d26cf0ae80e569d85f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "07321b10-dfc0-4385-af82-ee24754bc51a", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:01:40 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "46" + }, + "ResponseBody": { + "jobId": "0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "lastUpdateDateTime": "2021-10-20T15:01:38Z", + "createdDateTime": "2021-10-20T15:01:37Z", + "expirationDateTime": "2021-10-21T15:01:37Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "fce7960ffcea32129aba72fe7f5d8c65", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "c688c114-a2be-4d52-aef5-68d282170c6c", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:01:41 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "29" + }, + "ResponseBody": { + "jobId": "0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "lastUpdateDateTime": "2021-10-20T15:01:38Z", + "createdDateTime": "2021-10-20T15:01:37Z", + "expirationDateTime": "2021-10-21T15:01:37Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "5c9a2a9b48e95fa14123df2f239dd352", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "752f9eb2-5c06-4446-bc29-1a158cd0f95a", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:01:42 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "13" + }, + "ResponseBody": { + "jobId": "0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "lastUpdateDateTime": "2021-10-20T15:01:38Z", + "createdDateTime": "2021-10-20T15:01:37Z", + "expirationDateTime": "2021-10-21T15:01:37Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "c39e56f5b1e15a0d3d38e5f6c3d3350e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "4497f842-e462-4abe-a019-1a4c8acf3e93", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:01:43 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "31" + }, + "ResponseBody": { + "jobId": "0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "lastUpdateDateTime": "2021-10-20T15:01:38Z", + "createdDateTime": "2021-10-20T15:01:37Z", + "expirationDateTime": "2021-10-21T15:01:37Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "bbe549647ccfc676f588bac71ce20efc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "bb87cd20-5819-4b88-8b05-10fcbfa46cd8", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:01:44 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "7" + }, + "ResponseBody": { + "jobId": "0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "lastUpdateDateTime": "2021-10-20T15:01:38Z", + "createdDateTime": "2021-10-20T15:01:37Z", + "expirationDateTime": "2021-10-21T15:01:37Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "290820e7c8bfea831d3f1eb162aa9c6d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "429ece2b-7005-42de-bf53-ad003dc453a2", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:01:45 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "lastUpdateDateTime": "2021-10-20T15:01:38Z", + "createdDateTime": "2021-10-20T15:01:37Z", + "expirationDateTime": "2021-10-21T15:01:37Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "dacbd1ed17b87983e0d7ce58f6453d5b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "0436c306-7cfb-438b-9a4b-1335a6977312", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:01:47 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "lastUpdateDateTime": "2021-10-20T15:01:38Z", + "createdDateTime": "2021-10-20T15:01:37Z", + "expirationDateTime": "2021-10-21T15:01:37Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "a20fe9290ccb9c4fc5fa9e8f5dc4634a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "37be3aed-b8f8-4f0f-8345-9b2dbff83f62", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:01:48 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "15" + }, + "ResponseBody": { + "jobId": "0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "lastUpdateDateTime": "2021-10-20T15:01:38Z", + "createdDateTime": "2021-10-20T15:01:37Z", + "expirationDateTime": "2021-10-21T15:01:37Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "4bda4dec3317cf449d8f48e8f92bf3d7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "2e78e453-7969-43fb-bdbc-5d03628e719c", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:01:49 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "lastUpdateDateTime": "2021-10-20T15:01:38Z", + "createdDateTime": "2021-10-20T15:01:37Z", + "expirationDateTime": "2021-10-21T15:01:37Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "7988c202f99be0a2822f15bd79f31b1b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "5bfc24d4-0e45-450e-915b-b5df9b1d75d1", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:01:50 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "lastUpdateDateTime": "2021-10-20T15:01:38Z", + "createdDateTime": "2021-10-20T15:01:37Z", + "expirationDateTime": "2021-10-21T15:01:37Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "a96c8473f16bf544a43f053bc366a299", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "d3a64cec-f4fe-45f7-a31f-d74e12cf89ea", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:01:52 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "213" + }, + "ResponseBody": { + "jobId": "0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "lastUpdateDateTime": "2021-10-20T15:01:51Z", + "createdDateTime": "2021-10-20T15:01:37Z", + "expirationDateTime": "2021-10-21T15:01:37Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "extractiveSummarizationTasks": [ + { + "lastUpdateDateTime": "2021-10-20T15:01:51.6239495Z", + "taskName": "ExtractSummaryWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "sentences": [ + { + "text": "Windows 365 puts Microsoft\u2019s flagship operating system in the cloud.", + "rankScore": 0.42, + "offset": 1687, + "length": 68 + }, + { + "text": "Windows is already accessible in the cloud via Azure Virtual Desktop, which offers customers flexibility to create and run their own virtualization service.", + "rankScore": 0.8, + "offset": 2262, + "length": 156 + }, + { + "text": "Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy for today\u2019s login-from-anywhere, mobile and elastic workforces.", + "rankScore": 1.0, + "offset": 2419, + "length": 156 + } + ], + "warnings": [] + }, + { + "id": "2", + "sentences": [ + { + "text": "In this new world of Windows 365, remote workers flip the lid on their laptop, bootup the family workstation or clip a keyboard onto a tablet, launch a native app or modern web browser and login to their Windows 365 account.", + "rankScore": 0.9, + "offset": 460, + "length": 224 + }, + { + "text": "It enables employees accustomed to working from home to continue working from home;", + "rankScore": 1.0, + "offset": 1300, + "length": 83 + }, + { + "text": "it enables companies to hire interns from halfway around the world;", + "rankScore": 0.71, + "offset": 1384, + "length": 67 + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-08-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "9b8cc606ea3cf3aeaaf9c9e81e8656a9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "e646c3eb-0b8a-4222-b3a5-b07503eb14a6", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:01:53 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "78" + }, + "ResponseBody": { + "jobId": "0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "lastUpdateDateTime": "2021-10-20T15:01:51Z", + "createdDateTime": "2021-10-20T15:01:37Z", + "expirationDateTime": "2021-10-21T15:01:37Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "extractiveSummarizationTasks": [ + { + "lastUpdateDateTime": "2021-10-20T15:01:51.6239495Z", + "taskName": "ExtractSummaryWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "sentences": [ + { + "text": "Windows 365 puts Microsoft\u2019s flagship operating system in the cloud.", + "rankScore": 0.42, + "offset": 1687, + "length": 68 + }, + { + "text": "Windows is already accessible in the cloud via Azure Virtual Desktop, which offers customers flexibility to create and run their own virtualization service.", + "rankScore": 0.8, + "offset": 2262, + "length": 156 + }, + { + "text": "Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy for today\u2019s login-from-anywhere, mobile and elastic workforces.", + "rankScore": 1.0, + "offset": 2419, + "length": 156 + } + ], + "warnings": [] + }, + { + "id": "2", + "sentences": [ + { + "text": "In this new world of Windows 365, remote workers flip the lid on their laptop, bootup the family workstation or clip a keyboard onto a tablet, launch a native app or modern web browser and login to their Windows 365 account.", + "rankScore": 0.9, + "offset": 460, + "length": 224 + }, + { + "text": "It enables employees accustomed to working from home to continue working from home;", + "rankScore": 1.0, + "offset": 1300, + "length": 83 + }, + { + "text": "it enables companies to hire interns from halfway around the world;", + "rankScore": 0.71, + "offset": 1384, + "length": 67 + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-08-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "75742d734abe116c7e92d45cf3661c1b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "e4c37a5a-c90e-44f9-917b-ac3f99fa1d08", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:01:54 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "92" + }, + "ResponseBody": { + "jobId": "0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "lastUpdateDateTime": "2021-10-20T15:01:51Z", + "createdDateTime": "2021-10-20T15:01:37Z", + "expirationDateTime": "2021-10-21T15:01:37Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "extractiveSummarizationTasks": [ + { + "lastUpdateDateTime": "2021-10-20T15:01:51.6239495Z", + "taskName": "ExtractSummaryWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "sentences": [ + { + "text": "Windows 365 puts Microsoft\u2019s flagship operating system in the cloud.", + "rankScore": 0.42, + "offset": 1687, + "length": 68 + }, + { + "text": "Windows is already accessible in the cloud via Azure Virtual Desktop, which offers customers flexibility to create and run their own virtualization service.", + "rankScore": 0.8, + "offset": 2262, + "length": 156 + }, + { + "text": "Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy for today\u2019s login-from-anywhere, mobile and elastic workforces.", + "rankScore": 1.0, + "offset": 2419, + "length": 156 + } + ], + "warnings": [] + }, + { + "id": "2", + "sentences": [ + { + "text": "In this new world of Windows 365, remote workers flip the lid on their laptop, bootup the family workstation or clip a keyboard onto a tablet, launch a native app or modern web browser and login to their Windows 365 account.", + "rankScore": 0.9, + "offset": 460, + "length": 224 + }, + { + "text": "It enables employees accustomed to working from home to continue working from home;", + "rankScore": 1.0, + "offset": 1300, + "length": 83 + }, + { + "text": "it enables companies to hire interns from halfway around the world;", + "rankScore": 0.71, + "offset": 1384, + "length": 67 + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-08-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "b3b77b8c806689ded579fe71275cd71e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "7fe07db6-125c-4d82-9536-8af8460f9e15", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:01:57 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "152" + }, + "ResponseBody": { + "jobId": "0a84b2f1-40f6-4ce5-94eb-63c9f5556f56", + "lastUpdateDateTime": "2021-10-20T15:01:55Z", + "createdDateTime": "2021-10-20T15:01:37Z", + "expirationDateTime": "2021-10-21T15:01:37Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 2, + "failed": 0, + "inProgress": 0, + "total": 2, + "extractiveSummarizationTasks": [ + { + "lastUpdateDateTime": "2021-10-20T15:01:51.6239495Z", + "taskName": "ExtractSummaryWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "sentences": [ + { + "text": "Windows 365 puts Microsoft\u2019s flagship operating system in the cloud.", + "rankScore": 0.42, + "offset": 1687, + "length": 68 + }, + { + "text": "Windows is already accessible in the cloud via Azure Virtual Desktop, which offers customers flexibility to create and run their own virtualization service.", + "rankScore": 0.8, + "offset": 2262, + "length": 156 + }, + { + "text": "Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy for today\u2019s login-from-anywhere, mobile and elastic workforces.", + "rankScore": 1.0, + "offset": 2419, + "length": 156 + } + ], + "warnings": [] + }, + { + "id": "2", + "sentences": [ + { + "text": "In this new world of Windows 365, remote workers flip the lid on their laptop, bootup the family workstation or clip a keyboard onto a tablet, launch a native app or modern web browser and login to their Windows 365 account.", + "rankScore": 0.9, + "offset": 460, + "length": 224 + }, + { + "text": "It enables employees accustomed to working from home to continue working from home;", + "rankScore": 1.0, + "offset": 1300, + "length": 83 + }, + { + "text": "it enables companies to hire interns from halfway around the world;", + "rankScore": 0.71, + "offset": 1384, + "length": 67 + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-08-01" + } + }, + { + "lastUpdateDateTime": "2021-10-20T15:01:55.8851871Z", + "taskName": "ExtractSummary", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "sentences": [ + { + "text": "Windows 365 puts Microsoft\u2019s flagship operating system in the cloud.", + "rankScore": 0.42, + "offset": 1687, + "length": 68 + }, + { + "text": "Windows is already accessible in the cloud via Azure Virtual Desktop, which offers customers flexibility to create and run their own virtualization service.", + "rankScore": 0.8, + "offset": 2262, + "length": 156 + }, + { + "text": "Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy for today\u2019s login-from-anywhere, mobile and elastic workforces.", + "rankScore": 1.0, + "offset": 2419, + "length": 156 + } + ], + "warnings": [] + }, + { + "id": "2", + "sentences": [ + { + "text": "In this new world of Windows 365, remote workers flip the lid on their laptop, bootup the family workstation or clip a keyboard onto a tablet, launch a native app or modern web browser and login to their Windows 365 account.", + "rankScore": 0.9, + "offset": 460, + "length": 224 + }, + { + "text": "It enables employees accustomed to working from home to continue working from home;", + "rankScore": 1.0, + "offset": 1300, + "length": 83 + }, + { + "text": "it enables companies to hire interns from halfway around the world;", + "rankScore": 0.71, + "offset": 1384, + "length": 67 + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-08-01" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "1114564498", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticstestresources.cognitiveservices.azure.com/" + } +} \ No newline at end of file diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/ExtractSummaryTests/ExtractSummaryWithMultipleActionsAsync.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/ExtractSummaryTests/ExtractSummaryWithMultipleActionsAsync.json new file mode 100644 index 000000000000..b5dc4865a1e5 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/ExtractSummaryTests/ExtractSummaryWithMultipleActionsAsync.json @@ -0,0 +1,716 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Content-Length": "11039", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-54cad10705aa8e469806739231020794-aee93db63209e34a-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "3eeabf31c120d2f33d02ae39d3314fb9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "1", + "text": "No roads or rails connect the 39,000 people dispersed across Nunavut, a territory in northeastern Canada that spans three time zones and features fjord-cut isles that stretch into the Arctic Circle off the west coast of Greenland. About 80% of the population is of Inuit descent with cultural ties to the land that date back more than 4,000 years. Today, low-bandwidth satellite internet service links the people of Nunavut to each other and with the rest of the world. The Government of Nunavut relies on this internet link to provide healthcare, education, housing and family, and financial and other services to 25 communities. The smallest, Grise Fiord, has a population of 130; the largest, the capital, Iqaluit, has 8,500 people. About 3,100 people work full-time for the government, which has an office in each community. Another 3,000 people work for the government as relief workers, casual, term or contractors. Managing information technology for this dispersed and elastic workforce is a constant challenge for Martin Joy, director of information communication and technology for the Government of Nunavut. \u201CTraditionally, in IT, you would have to send a device or mail a device to that end user. In Nunavut, there is no road, there is no logistical framework that allows us to move stuff cost-effectively, so everything has to be flown,\u201D he explained. \u201CBased on weather, based on the types of cargo flows, that could take a considerable amount of time. It could take two to three weeks for us to get a user a device to get them onboarded securely into our environment.\u201D \u201CNow, with Windows 365, we can do that within less than an hour of the account being created,\u201D he said. Windows 365 puts Microsoft\u2019s flagship operating system in the cloud. Users select Windows 10 or Windows 11, once it is generally available later this calendar year, along with a configuration of processing power, storage and memory that suits their needs. They then access their Cloud PC through a native application or web browser on any device, from anywhere with an internet connection. The creation of the Cloud PC follows other products and services to the cloud, from Windows Server on Azure to the suite of Microsoft Office productivity applications in Microsoft 365. Windows is already accessible in the cloud via Azure Virtual Desktop, which offers customers flexibility to create and run their own virtualization service. Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy for today\u2019s login-from-anywhere, mobile and elastic workforces. \u201CWindows 365 is really going to make a huge difference for organizations that wanted to try virtualization for various reasons but could not \u2013 maybe it was too costly, too complex or they didn\u2019t have the expertise in house to do it,\u201D said Wangui McKelvey, general manager of Microsoft 365, who works from a home office in Atlanta, Georgia. With Windows 365, she added, IT admins can manage and deploy Cloud PCs using the same tools they use today to manage physical PCs. The remote and hybrid workforces of today and tomorrow were top of mind for Scott Manchester when he set out to develop Windows 365. The director of program management for Windows 365 in Redmond, Washington, wanted to deliver an experience with the look, feel and security of a traditional Windows PC, only accessed through a native app or web browser on a device of the user\u2019s choosing from anywhere with an internet connection. \u201CYou want them to be able to get access to their corporate resources, applications, databases and HR tools, and do all the things they do in a typical workday sitting in the office \u2013 you want them to have that same experience,\u201D he said. \u201CAnd you want them to have that experience in such a way that it feels familiar to them. It\u2019s not this jolting thing that takes away all the things they love about Windows.\u201D Virtualization, he noted, can be challenging to set up and maintain, especially for organizations without dedicated IT resources. IT consulting firms do brisk business working with companies to set up virtualization solutions and staffing help desks to field calls from employees when they run into complications. Manchester knows this because he worked on Microsoft\u2019s Windows virtualization technologies for nearly two decades prior to leading the development of Windows 365. The inspiration for Windows 365 came earlier, when he was assigned to an internal team at Microsoft working on a project, code named Arcadia, a consumer-facing service that would stream video games from the cloud. The target audience \u2013 gamers \u2013 lacks an IT department to lean on when things glitch. \u201CThat started me thinking, \u2018How do we build something that doesn\u2019t require IT intervention, something that could truly scale to the consumer market?\u2019\u201D Manchester said. The consumer experience was Manchester\u2019s benchmark when he started work on virtualization. \u201CI took note of every time there was something that didn\u2019t quite deliver on that,\u201D he said. \u201CAnd, as I started meeting with customers and partners and learning about how they fill in these gaps either by setting expectations of their workforce or having an IT department that picks up the phone and deals with those situations, I realized we had some ground to cover.\u201D Covering that ground led to improvements in Microsoft\u2019s business offering now known as Azure Virtual Desktop. This offering continues to experience accelerated growth among customers who need full customization and control over their operating environment and have the resources for dedicated IT staff to support the system, Manchester noted. Windows 365 is for the approximate 80% of the marketplace that lacks the need for full customization or the resources for dedicated IT. To lead the development of Windows 365, Manchester leaned into his Arcadia mindset. \u201CWhen we built this team, we brought in a couple of leaders who had experience with virtualization, but for the most part we brought in people who had experience with Windows and experience with consumer experiences because that was the bar we wanted to set,\u201D he said. Soon after this bar was set, and the first batch of hires made \u2013 a handful of experts in virtualization and user experience \u2013 COVID-19 hit and changed the world. \u201CWe hired everybody else during the pandemic,\u201D Manchester said. \u201CThey were remote. They were living all over the U.S., Australia, Europe and China. Many of them have never set foot in the office. And as soon as we got far enough along with the development, we moved those people to use the service. People who never used virtualization before, had no expectations \u2013 their bar was the experience they had on their laptop \u2013 and we basically used Windows 365 to build Windows 365.\u201D As the team used the service and encountered bugs in the system, they worked through and solved them on their way to creating a unique category of virtualization, the Cloud PC. \u201CWe\u2019re giving you Windows from the cloud,\u201D Manchester said.", + "language": "en" + }, + { + "id": "2", + "text": "Windows 365 was in the works before COVID-19 sent companies around the world on a scramble to secure solutions to support employees suddenly forced to work from home, but \u201Cwhat really put the firecracker behind it was the pandemic, it accelerated everything,\u201D McKelvey said. She explained that customers were asking, \u201C\u2019How do we create an experience for people that makes them still feel connected to the company without the physical presence of being there?\u201D In this new world of Windows 365, remote workers flip the lid on their laptop, bootup the family workstation or clip a keyboard onto a tablet, launch a native app or modern web browser and login to their Windows 365 account. From there, their Cloud PC appears with their background, apps, settings and content just as they left it when they last were last there \u2013 in the office, at home or a coffee shop. \u201CAnd then, when you\u2019re done, you\u2019re done. You won\u2019t have any issues around security because you\u2019re not saving anything on your device,\u201D McKelvey said, noting that all the data is stored in the cloud. The ability to login to a Cloud PC from anywhere on any device is part of Microsoft\u2019s larger strategy around tailoring products such as Microsoft Teams and Microsoft 365 for the post-pandemic hybrid workforce of the future, she added. It enables employees accustomed to working from home to continue working from home; it enables companies to hire interns from halfway around the world; it allows startups to scale without requiring IT expertise. \u201CI think this will be interesting for those organizations who, for whatever reason, have shied away from virtualization. This is giving them an opportunity to try it in a way that their regular, everyday endpoint admin could manage,\u201D McKelvey said. The simplicity of Windows 365 won over Dean Wells, the corporate chief information officer for the Government of Nunavut. His team previously attempted to deploy a traditional virtual desktop infrastructure and found it inefficient and unsustainable given the limitations of low-bandwidth satellite internet and the constant need for IT staff to manage the network and infrastructure. We didn\u2019t run it for very long,\u201D he said. \u201CIt didn\u2019t turn out the way we had hoped. So, we actually had terminated the project and rolled back out to just regular PCs.\u201D He re-evaluated this decision after the Government of Nunavut was hit by a ransomware attack in November 2019 that took down everything from the phone system to the government\u2019s servers. Microsoft helped rebuild the system, moving the government to Teams, SharePoint, OneDrive and Microsoft 365. Manchester\u2019s team recruited the Government of Nunavut to pilot Windows 365. Wells was intrigued, especially by the ability to manage the elastic workforce securely and seamlessly. \u201CThe impact that I believe we are finding, and the impact that we\u2019re going to find going forward, is being able to access specialists from outside the territory and organizations outside the territory to come in and help us with our projects, being able to get people on staff with us to help us deliver the day-to-day expertise that we need to run the government,\u201D he said. \u201CBeing able to improve healthcare, being able to improve education, economic development is going to improve the quality of life in the communities.\u201D", + "language": "en" + } + ] + }, + "tasks": { + "extractiveSummarizationTasks": [ + { + "parameters": { + "loggingOptOut": true, + "stringIndexType": "Utf16CodeUnit" + }, + "taskName": "ExtractSummaryWithDisabledServiceLogs" + }, + { + "parameters": { + "stringIndexType": "Utf16CodeUnit" + }, + "taskName": "ExtractSummary" + } + ] + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "28aacef8-0551-4b20-9be0-7d5d92607e85", + "Date": "Wed, 20 Oct 2021 15:01:58 GMT", + "operation-location": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/878a95d9-375b-4cb0-9bc2-c222e759f222", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "393" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/878a95d9-375b-4cb0-9bc2-c222e759f222", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "7b402d050d70addfa2ecfc1d57fa81d7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "bda6ad3c-e217-451c-9256-3d3d3a28eb33", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:01:58 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "103" + }, + "ResponseBody": { + "jobId": "878a95d9-375b-4cb0-9bc2-c222e759f222", + "lastUpdateDateTime": "2021-10-20T15:01:59Z", + "createdDateTime": "2021-10-20T15:01:58Z", + "expirationDateTime": "2021-10-21T15:01:58Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/878a95d9-375b-4cb0-9bc2-c222e759f222", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "e12b9bc0e0b1fc9da2d8c680446ccb0c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "0c7a302a-544b-44b4-b7ca-7566af4d7e02", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:02:00 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "10" + }, + "ResponseBody": { + "jobId": "878a95d9-375b-4cb0-9bc2-c222e759f222", + "lastUpdateDateTime": "2021-10-20T15:01:59Z", + "createdDateTime": "2021-10-20T15:01:58Z", + "expirationDateTime": "2021-10-21T15:01:58Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/878a95d9-375b-4cb0-9bc2-c222e759f222", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "ef77229f6cc324c0df3d9c33c4d57a42", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "ab142577-b2b5-459c-a3ab-5e188aa35a41", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:02:01 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "878a95d9-375b-4cb0-9bc2-c222e759f222", + "lastUpdateDateTime": "2021-10-20T15:01:59Z", + "createdDateTime": "2021-10-20T15:01:58Z", + "expirationDateTime": "2021-10-21T15:01:58Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/878a95d9-375b-4cb0-9bc2-c222e759f222", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "3778d7816e0525088f44d997475f6936", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "52b5e264-e789-4796-af90-7ba5937d078f", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:02:02 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "13" + }, + "ResponseBody": { + "jobId": "878a95d9-375b-4cb0-9bc2-c222e759f222", + "lastUpdateDateTime": "2021-10-20T15:01:59Z", + "createdDateTime": "2021-10-20T15:01:58Z", + "expirationDateTime": "2021-10-21T15:01:58Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/878a95d9-375b-4cb0-9bc2-c222e759f222", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "357ef02191825414db070173446a38cc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "006ec95d-a6b7-42af-bfe7-b293c3d21915", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:02:03 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "10" + }, + "ResponseBody": { + "jobId": "878a95d9-375b-4cb0-9bc2-c222e759f222", + "lastUpdateDateTime": "2021-10-20T15:01:59Z", + "createdDateTime": "2021-10-20T15:01:58Z", + "expirationDateTime": "2021-10-21T15:01:58Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/878a95d9-375b-4cb0-9bc2-c222e759f222", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "6dff835d93f431061a52607e9328dc7f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "a6496bbb-9530-4222-90f9-afd0817eb203", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:02:05 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "26" + }, + "ResponseBody": { + "jobId": "878a95d9-375b-4cb0-9bc2-c222e759f222", + "lastUpdateDateTime": "2021-10-20T15:01:59Z", + "createdDateTime": "2021-10-20T15:01:58Z", + "expirationDateTime": "2021-10-21T15:01:58Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/878a95d9-375b-4cb0-9bc2-c222e759f222", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "d31265d34557efc0c3245cfe6c94e024", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "b3e54f1e-de3d-4b4e-8924-e70fe1118988", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:02:06 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "11" + }, + "ResponseBody": { + "jobId": "878a95d9-375b-4cb0-9bc2-c222e759f222", + "lastUpdateDateTime": "2021-10-20T15:01:59Z", + "createdDateTime": "2021-10-20T15:01:58Z", + "expirationDateTime": "2021-10-21T15:01:58Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/878a95d9-375b-4cb0-9bc2-c222e759f222", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "c4390c0bfc608d41e94d1a2f3095c1b2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "ae2873c4-e169-4f92-8b72-dadaf855572b", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:02:08 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "28" + }, + "ResponseBody": { + "jobId": "878a95d9-375b-4cb0-9bc2-c222e759f222", + "lastUpdateDateTime": "2021-10-20T15:01:59Z", + "createdDateTime": "2021-10-20T15:01:58Z", + "expirationDateTime": "2021-10-21T15:01:58Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/878a95d9-375b-4cb0-9bc2-c222e759f222", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "dea0822a64581774c20faad03608c585", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "6ac0e3dd-0771-40bf-bfbc-3de04ef30039", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:02:09 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "51" + }, + "ResponseBody": { + "jobId": "878a95d9-375b-4cb0-9bc2-c222e759f222", + "lastUpdateDateTime": "2021-10-20T15:01:59Z", + "createdDateTime": "2021-10-20T15:01:58Z", + "expirationDateTime": "2021-10-21T15:01:58Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/878a95d9-375b-4cb0-9bc2-c222e759f222", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "86733c7118eed71f2485ea0a2b90be2d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "6ec9f4c8-144d-44db-91dc-fdbd6d008bcb", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:02:10 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "878a95d9-375b-4cb0-9bc2-c222e759f222", + "lastUpdateDateTime": "2021-10-20T15:01:59Z", + "createdDateTime": "2021-10-20T15:01:58Z", + "expirationDateTime": "2021-10-21T15:01:58Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/878a95d9-375b-4cb0-9bc2-c222e759f222", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "e9d3aa6202f4a7cc97220150527156e1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "85a34b32-aa6f-4092-a40d-d0acaacc50fe", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:02:11 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "23" + }, + "ResponseBody": { + "jobId": "878a95d9-375b-4cb0-9bc2-c222e759f222", + "lastUpdateDateTime": "2021-10-20T15:01:59Z", + "createdDateTime": "2021-10-20T15:01:58Z", + "expirationDateTime": "2021-10-21T15:01:58Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/878a95d9-375b-4cb0-9bc2-c222e759f222", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "f4be94883b2212c362c9bad37a6aec32", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "347697b7-ea8d-4819-81ac-da3d5fd287d1", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:02:12 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "81" + }, + "ResponseBody": { + "jobId": "878a95d9-375b-4cb0-9bc2-c222e759f222", + "lastUpdateDateTime": "2021-10-20T15:02:13Z", + "createdDateTime": "2021-10-20T15:01:58Z", + "expirationDateTime": "2021-10-21T15:01:58Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "extractiveSummarizationTasks": [ + { + "lastUpdateDateTime": "2021-10-20T15:02:13.0863896Z", + "taskName": "ExtractSummary", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "sentences": [ + { + "text": "Windows 365 puts Microsoft\u2019s flagship operating system in the cloud.", + "rankScore": 0.42, + "offset": 1687, + "length": 68 + }, + { + "text": "Windows is already accessible in the cloud via Azure Virtual Desktop, which offers customers flexibility to create and run their own virtualization service.", + "rankScore": 0.8, + "offset": 2262, + "length": 156 + }, + { + "text": "Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy for today\u2019s login-from-anywhere, mobile and elastic workforces.", + "rankScore": 1.0, + "offset": 2419, + "length": 156 + } + ], + "warnings": [] + }, + { + "id": "2", + "sentences": [ + { + "text": "In this new world of Windows 365, remote workers flip the lid on their laptop, bootup the family workstation or clip a keyboard onto a tablet, launch a native app or modern web browser and login to their Windows 365 account.", + "rankScore": 0.9, + "offset": 460, + "length": 224 + }, + { + "text": "It enables employees accustomed to working from home to continue working from home;", + "rankScore": 1.0, + "offset": 1300, + "length": 83 + }, + { + "text": "it enables companies to hire interns from halfway around the world;", + "rankScore": 0.71, + "offset": 1384, + "length": 67 + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-08-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/878a95d9-375b-4cb0-9bc2-c222e759f222", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "8c6d7c50db346f916fcceecc16ce84b2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "e6c0eddd-1e04-48c7-b808-01f4f714eee0", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:02:14 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "299" + }, + "ResponseBody": { + "jobId": "878a95d9-375b-4cb0-9bc2-c222e759f222", + "lastUpdateDateTime": "2021-10-20T15:02:13Z", + "createdDateTime": "2021-10-20T15:01:58Z", + "expirationDateTime": "2021-10-21T15:01:58Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 2, + "failed": 0, + "inProgress": 0, + "total": 2, + "extractiveSummarizationTasks": [ + { + "lastUpdateDateTime": "2021-10-20T15:02:13.4472359Z", + "taskName": "ExtractSummaryWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "sentences": [ + { + "text": "Windows 365 puts Microsoft\u2019s flagship operating system in the cloud.", + "rankScore": 0.42, + "offset": 1687, + "length": 68 + }, + { + "text": "Windows is already accessible in the cloud via Azure Virtual Desktop, which offers customers flexibility to create and run their own virtualization service.", + "rankScore": 0.8, + "offset": 2262, + "length": 156 + }, + { + "text": "Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy for today\u2019s login-from-anywhere, mobile and elastic workforces.", + "rankScore": 1.0, + "offset": 2419, + "length": 156 + } + ], + "warnings": [] + }, + { + "id": "2", + "sentences": [ + { + "text": "In this new world of Windows 365, remote workers flip the lid on their laptop, bootup the family workstation or clip a keyboard onto a tablet, launch a native app or modern web browser and login to their Windows 365 account.", + "rankScore": 0.9, + "offset": 460, + "length": 224 + }, + { + "text": "It enables employees accustomed to working from home to continue working from home;", + "rankScore": 1.0, + "offset": 1300, + "length": 83 + }, + { + "text": "it enables companies to hire interns from halfway around the world;", + "rankScore": 0.71, + "offset": 1384, + "length": 67 + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-08-01" + } + }, + { + "lastUpdateDateTime": "2021-10-20T15:02:13.0863896Z", + "taskName": "ExtractSummary", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "sentences": [ + { + "text": "Windows 365 puts Microsoft\u2019s flagship operating system in the cloud.", + "rankScore": 0.42, + "offset": 1687, + "length": 68 + }, + { + "text": "Windows is already accessible in the cloud via Azure Virtual Desktop, which offers customers flexibility to create and run their own virtualization service.", + "rankScore": 0.8, + "offset": 2262, + "length": 156 + }, + { + "text": "Windows 365 is a new virtualization technology for Windows that is easy to set up and deploy for today\u2019s login-from-anywhere, mobile and elastic workforces.", + "rankScore": 1.0, + "offset": 2419, + "length": 156 + } + ], + "warnings": [] + }, + { + "id": "2", + "sentences": [ + { + "text": "In this new world of Windows 365, remote workers flip the lid on their laptop, bootup the family workstation or clip a keyboard onto a tablet, launch a native app or modern web browser and login to their Windows 365 account.", + "rankScore": 0.9, + "offset": 460, + "length": 224 + }, + { + "text": "It enables employees accustomed to working from home to continue working from home;", + "rankScore": 1.0, + "offset": 1300, + "length": 83 + }, + { + "text": "it enables companies to hire interns from halfway around the world;", + "rankScore": 0.71, + "offset": 1384, + "length": 67 + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-08-01" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "496980875", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticstestresources.cognitiveservices.azure.com/" + } +} \ No newline at end of file diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/MultiCategoryClassifyTests/MultiCategoryClassifyWithMultipleActions.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/MultiCategoryClassifyTests/MultiCategoryClassifyWithMultipleActions.json new file mode 100644 index 000000000000..85eabe1ea559 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/MultiCategoryClassifyTests/MultiCategoryClassifyWithMultipleActions.json @@ -0,0 +1,233 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Content-Length": "806", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-cd26d77ae1952943a6c553561200d9cb-7fa4da8e6328c74e-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211021.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "40e1470f487c81679e7998dff1902916", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "I need a reservation for an indoor restaurant in China. Please don\u0027t stop the music. Play music and add it to my playlist", + "language": "en" + }, + { + "id": "1", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + "language": "en" + } + ] + }, + "tasks": { + "customMultiClassificationTasks": [ + { + "parameters": { + "project-name": "7cdace98-537b-494a-b69a-c19754718025", + "deployment-name": "7cdace98-537b-494a-b69a-c19754718025", + "loggingOptOut": true + }, + "taskName": "MultiCategoryClassifyWithDisabledServiceLogs" + }, + { + "parameters": { + "project-name": "7cdace98-537b-494a-b69a-c19754718025", + "deployment-name": "7cdace98-537b-494a-b69a-c19754718025" + }, + "taskName": "MultiCategoryClassify" + } + ] + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "4bbb64e9-b1ab-439f-95d6-c00bcbe4f1f1", + "Date": "Thu, 21 Oct 2021 20:13:48 GMT", + "operation-location": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/9e184195-b57a-4b22-b274-5ed1f813f90b", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "860" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/9e184195-b57a-4b22-b274-5ed1f813f90b", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211021.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "98696fff1ddb7f3bf091404a2acfd4d6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "08bc500c-e3bc-42b9-9d30-51f51d733759", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 21 Oct 2021 20:13:48 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "82" + }, + "ResponseBody": { + "jobId": "9e184195-b57a-4b22-b274-5ed1f813f90b", + "lastUpdateDateTime": "2021-10-21T20:13:48Z", + "createdDateTime": "2021-10-21T20:13:47Z", + "expirationDateTime": "2021-10-22T20:13:47Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/9e184195-b57a-4b22-b274-5ed1f813f90b", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211021.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "6167bef3ddbaeadd0104a6243fef0893", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "a9689b1a-e71f-4615-8cdd-6898199a7500", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 21 Oct 2021 20:13:50 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "68" + }, + "ResponseBody": { + "jobId": "9e184195-b57a-4b22-b274-5ed1f813f90b", + "lastUpdateDateTime": "2021-10-21T20:13:48Z", + "createdDateTime": "2021-10-21T20:13:47Z", + "expirationDateTime": "2021-10-22T20:13:47Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/9e184195-b57a-4b22-b274-5ed1f813f90b", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211021.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "07fb802779a9f18a0b614fea081d57cf", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "efb1593f-a28e-4ed9-a893-c417884aded3", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 21 Oct 2021 20:13:51 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "609" + }, + "ResponseBody": { + "jobId": "9e184195-b57a-4b22-b274-5ed1f813f90b", + "lastUpdateDateTime": "2021-10-21T20:13:51Z", + "createdDateTime": "2021-10-21T20:13:47Z", + "expirationDateTime": "2021-10-22T20:13:47Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 2, + "failed": 0, + "inProgress": 0, + "total": 2, + "customMultiClassificationTasks": [ + { + "lastUpdateDateTime": "2021-10-21T20:13:51.3506478Z", + "taskName": "MultiCategoryClassifyWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "classifications": [ + { + "category": "BookRestaurant", + "confidenceScore": 0.97 + } + ], + "warnings": [] + }, + { + "id": "1", + "classifications": [], + "warnings": [] + } + ], + "errors": [], + "projectName": "7cdace98-537b-494a-b69a-c19754718025", + "deploymentName": "7cdace98-537b-494a-b69a-c19754718025" + } + }, + { + "lastUpdateDateTime": "2021-10-21T20:13:51.2525398Z", + "taskName": "MultiCategoryClassify", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "classifications": [ + { + "category": "BookRestaurant", + "confidenceScore": 0.97 + } + ], + "warnings": [] + }, + { + "id": "1", + "classifications": [], + "warnings": [] + } + ], + "errors": [], + "projectName": "7cdace98-537b-494a-b69a-c19754718025", + "deploymentName": "7cdace98-537b-494a-b69a-c19754718025" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "647174410", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticstestresources.cognitiveservices.azure.com/" + } +} \ No newline at end of file diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/MultiCategoryClassifyTests/MultiCategoryClassifyWithMultipleActionsAsync.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/MultiCategoryClassifyTests/MultiCategoryClassifyWithMultipleActionsAsync.json new file mode 100644 index 000000000000..ae80a1ec6ae5 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/MultiCategoryClassifyTests/MultiCategoryClassifyWithMultipleActionsAsync.json @@ -0,0 +1,197 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Content-Length": "806", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-c0d594b1e2469f44a1a3040fd9bc8613-12666a1ead56384d-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211021.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "2fa05d10916b53aaaee0a24605592c6a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "I need a reservation for an indoor restaurant in China. Please don\u0027t stop the music. Play music and add it to my playlist", + "language": "en" + }, + { + "id": "1", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + "language": "en" + } + ] + }, + "tasks": { + "customMultiClassificationTasks": [ + { + "parameters": { + "project-name": "7cdace98-537b-494a-b69a-c19754718025", + "deployment-name": "7cdace98-537b-494a-b69a-c19754718025", + "loggingOptOut": true + }, + "taskName": "MultiCategoryClassifyWithDisabledServiceLogs" + }, + { + "parameters": { + "project-name": "7cdace98-537b-494a-b69a-c19754718025", + "deployment-name": "7cdace98-537b-494a-b69a-c19754718025" + }, + "taskName": "MultiCategoryClassify" + } + ] + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "a5342046-a4e0-4fa7-a90e-178c91696ffc", + "Date": "Thu, 21 Oct 2021 20:13:53 GMT", + "operation-location": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/c6ab2025-d2bd-4b5f-ad97-82eb28c1b154", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "669" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/c6ab2025-d2bd-4b5f-ad97-82eb28c1b154", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211021.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "71858327133e398fb9ddae770955e4e9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "fc3640e9-68c3-452f-9a21-e0167c630f52", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 21 Oct 2021 20:13:54 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "75" + }, + "ResponseBody": { + "jobId": "c6ab2025-d2bd-4b5f-ad97-82eb28c1b154", + "lastUpdateDateTime": "2021-10-21T20:13:54Z", + "createdDateTime": "2021-10-21T20:13:53Z", + "expirationDateTime": "2021-10-22T20:13:53Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/c6ab2025-d2bd-4b5f-ad97-82eb28c1b154", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211021.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "f4915ed0c4372b6b01dbaf4cbb215edc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "6a919549-bd41-4a3f-9044-f8d9353d80a7", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 21 Oct 2021 20:13:56 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "472" + }, + "ResponseBody": { + "jobId": "c6ab2025-d2bd-4b5f-ad97-82eb28c1b154", + "lastUpdateDateTime": "2021-10-21T20:13:54Z", + "createdDateTime": "2021-10-21T20:13:53Z", + "expirationDateTime": "2021-10-22T20:13:53Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 2, + "failed": 0, + "inProgress": 0, + "total": 2, + "customMultiClassificationTasks": [ + { + "lastUpdateDateTime": "2021-10-21T20:13:54.637118Z", + "taskName": "MultiCategoryClassifyWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "classifications": [ + { + "category": "BookRestaurant", + "confidenceScore": 0.97 + } + ], + "warnings": [] + }, + { + "id": "1", + "classifications": [], + "warnings": [] + } + ], + "errors": [], + "projectName": "7cdace98-537b-494a-b69a-c19754718025", + "deploymentName": "7cdace98-537b-494a-b69a-c19754718025" + } + }, + { + "lastUpdateDateTime": "2021-10-21T20:13:54.6271607Z", + "taskName": "MultiCategoryClassify", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "classifications": [ + { + "category": "BookRestaurant", + "confidenceScore": 0.97 + } + ], + "warnings": [] + }, + { + "id": "1", + "classifications": [], + "warnings": [] + } + ], + "errors": [], + "projectName": "7cdace98-537b-494a-b69a-c19754718025", + "deploymentName": "7cdace98-537b-494a-b69a-c19754718025" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "120428012", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticstestresources.cognitiveservices.azure.com/" + } +} \ No newline at end of file diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeCustomEntitiesTests/RecognizeCustomEntitiesWithMultipleActions.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeCustomEntitiesTests/RecognizeCustomEntitiesWithMultipleActions.json new file mode 100644 index 000000000000..e585a43b8ec6 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeCustomEntitiesTests/RecognizeCustomEntitiesWithMultipleActions.json @@ -0,0 +1,325 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Content-Length": "656", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-9126f8550e3acd45ae6408031f49afe4-7ac31cbc6073b54e-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211021.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "811798329e93c7b0eee851ed76210b34", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "A recent report by the Government Accountability Office found a dramatic increase in oil.", + "language": "en" + }, + { + "id": "1", + "text": "Capital Call #20 for Berkshire Multifamily.", + "language": "en" + } + ] + }, + "tasks": { + "customEntityRecognitionTasks": [ + { + "parameters": { + "project-name": "88ee0f78-fbca-444d-98e2-7c4c8631e494", + "deployment-name": "88ee0f78-fbca-444d-98e2-7c4c8631e494", + "loggingOptOut": true + }, + "taskName": "RecognizeCustomEntitiesWithDisabledServiceLogs" + }, + { + "parameters": { + "project-name": "88ee0f78-fbca-444d-98e2-7c4c8631e494", + "deployment-name": "88ee0f78-fbca-444d-98e2-7c4c8631e494" + }, + "taskName": "RecognizeCustomEntities" + } + ] + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "ae1386ef-8cca-4b58-9bc1-aaa40aefaf79", + "Date": "Thu, 21 Oct 2021 20:15:33 GMT", + "operation-location": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a4736413-ad8d-433b-89aa-eea0615e5e3b", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "755" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a4736413-ad8d-433b-89aa-eea0615e5e3b", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211021.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "0f29f833bbc61044dfbe237d258d7551", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "dc4ea07f-6717-4213-bdb5-d2cad11f3135", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 21 Oct 2021 20:15:34 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "102" + }, + "ResponseBody": { + "jobId": "a4736413-ad8d-433b-89aa-eea0615e5e3b", + "lastUpdateDateTime": "2021-10-21T20:15:34Z", + "createdDateTime": "2021-10-21T20:15:33Z", + "expirationDateTime": "2021-10-22T20:15:33Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a4736413-ad8d-433b-89aa-eea0615e5e3b", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211021.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "d52524e221c1fa02adf4517f9cdbaa1b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "032ae8cc-6cd0-41dd-9414-1269dd7b0763", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 21 Oct 2021 20:15:35 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "111" + }, + "ResponseBody": { + "jobId": "a4736413-ad8d-433b-89aa-eea0615e5e3b", + "lastUpdateDateTime": "2021-10-21T20:15:34Z", + "createdDateTime": "2021-10-21T20:15:33Z", + "expirationDateTime": "2021-10-22T20:15:33Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a4736413-ad8d-433b-89aa-eea0615e5e3b", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211021.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "8ec22a27048277955307a2d47a32a261", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "990c132a-5c9d-4e20-98e3-a5123f246391", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 21 Oct 2021 20:15:37 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "323" + }, + "ResponseBody": { + "jobId": "a4736413-ad8d-433b-89aa-eea0615e5e3b", + "lastUpdateDateTime": "2021-10-21T20:15:37Z", + "createdDateTime": "2021-10-21T20:15:33Z", + "expirationDateTime": "2021-10-22T20:15:33Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 2, + "failed": 0, + "inProgress": 0, + "total": 2, + "customEntityRecognitionTasks": [ + { + "lastUpdateDateTime": "2021-10-21T20:15:37.6657762Z", + "taskName": "RecognizeCustomEntitiesWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "entities": [ + { + "text": "recent", + "category": "object_select", + "offset": 2, + "length": 6, + "confidenceScore": 0.08 + }, + { + "text": "Government", + "category": "restaurant_name", + "offset": 23, + "length": 10, + "confidenceScore": 0.05 + }, + { + "text": "Office", + "category": "restaurant_name", + "offset": 49, + "length": 6, + "confidenceScore": 0.11 + }, + { + "text": "Accountability", + "category": "geographic_poi", + "offset": 34, + "length": 14, + "confidenceScore": 0.07 + }, + { + "text": "dramatic", + "category": "sort", + "offset": 64, + "length": 8, + "confidenceScore": 0.03 + }, + { + "text": "oil", + "category": "music_item", + "offset": 85, + "length": 3, + "confidenceScore": 0.06 + } + ], + "warnings": [] + }, + { + "id": "1", + "entities": [ + { + "text": "Berkshire Multifamily", + "category": "location_name", + "offset": 21, + "length": 21, + "confidenceScore": 0.46 + } + ], + "warnings": [] + } + ], + "errors": [], + "projectName": "88ee0f78-fbca-444d-98e2-7c4c8631e494", + "deploymentName": "88ee0f78-fbca-444d-98e2-7c4c8631e494" + } + }, + { + "lastUpdateDateTime": "2021-10-21T20:15:37.2190436Z", + "taskName": "RecognizeCustomEntities", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "entities": [ + { + "text": "recent", + "category": "object_select", + "offset": 2, + "length": 6, + "confidenceScore": 0.08 + }, + { + "text": "Government", + "category": "restaurant_name", + "offset": 23, + "length": 10, + "confidenceScore": 0.05 + }, + { + "text": "Office", + "category": "restaurant_name", + "offset": 49, + "length": 6, + "confidenceScore": 0.11 + }, + { + "text": "Accountability", + "category": "geographic_poi", + "offset": 34, + "length": 14, + "confidenceScore": 0.07 + }, + { + "text": "dramatic", + "category": "sort", + "offset": 64, + "length": 8, + "confidenceScore": 0.03 + }, + { + "text": "oil", + "category": "music_item", + "offset": 85, + "length": 3, + "confidenceScore": 0.06 + } + ], + "warnings": [] + }, + { + "id": "1", + "entities": [ + { + "text": "Berkshire Multifamily", + "category": "location_name", + "offset": 21, + "length": 21, + "confidenceScore": 0.46 + } + ], + "warnings": [] + } + ], + "errors": [], + "projectName": "88ee0f78-fbca-444d-98e2-7c4c8631e494", + "deploymentName": "88ee0f78-fbca-444d-98e2-7c4c8631e494" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "718786967", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticstestresources.cognitiveservices.azure.com/" + } +} \ No newline at end of file diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeCustomEntitiesTests/RecognizeCustomEntitiesWithMultipleActionsAsync.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeCustomEntitiesTests/RecognizeCustomEntitiesWithMultipleActionsAsync.json new file mode 100644 index 000000000000..c5d7f00d5fc5 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeCustomEntitiesTests/RecognizeCustomEntitiesWithMultipleActionsAsync.json @@ -0,0 +1,253 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Content-Length": "656", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-af1bed3f1cffef44b6fa05c9410ea420-a6874068017c314d-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211021.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "51a9ddef8cc9376c5ef234453d6d2e36", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "A recent report by the Government Accountability Office found a dramatic increase in oil.", + "language": "en" + }, + { + "id": "1", + "text": "Capital Call #20 for Berkshire Multifamily.", + "language": "en" + } + ] + }, + "tasks": { + "customEntityRecognitionTasks": [ + { + "parameters": { + "project-name": "88ee0f78-fbca-444d-98e2-7c4c8631e494", + "deployment-name": "88ee0f78-fbca-444d-98e2-7c4c8631e494", + "loggingOptOut": true + }, + "taskName": "RecognizeCustomEntitiesWithDisabledServiceLogs" + }, + { + "parameters": { + "project-name": "88ee0f78-fbca-444d-98e2-7c4c8631e494", + "deployment-name": "88ee0f78-fbca-444d-98e2-7c4c8631e494" + }, + "taskName": "RecognizeCustomEntities" + } + ] + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "89ec913c-024f-43d8-9f71-db6b6917b5d4", + "Date": "Thu, 21 Oct 2021 20:15:53 GMT", + "operation-location": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/76b8f165-d23b-4f60-b53d-d52d5a82cbd6", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "14721" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/76b8f165-d23b-4f60-b53d-d52d5a82cbd6", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211021.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "28b605fdaa41e7f7c65dc469206cdb0b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "72fa7a7b-221d-497e-8898-563a518c8337", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 21 Oct 2021 20:15:54 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "278" + }, + "ResponseBody": { + "jobId": "76b8f165-d23b-4f60-b53d-d52d5a82cbd6", + "lastUpdateDateTime": "2021-10-21T20:15:48Z", + "createdDateTime": "2021-10-21T20:15:47Z", + "expirationDateTime": "2021-10-22T20:15:47Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 2, + "failed": 0, + "inProgress": 0, + "total": 2, + "customEntityRecognitionTasks": [ + { + "lastUpdateDateTime": "2021-10-21T20:15:48.5605703Z", + "taskName": "RecognizeCustomEntitiesWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "entities": [ + { + "text": "recent", + "category": "object_select", + "offset": 2, + "length": 6, + "confidenceScore": 0.08 + }, + { + "text": "Government", + "category": "restaurant_name", + "offset": 23, + "length": 10, + "confidenceScore": 0.05 + }, + { + "text": "Office", + "category": "restaurant_name", + "offset": 49, + "length": 6, + "confidenceScore": 0.11 + }, + { + "text": "Accountability", + "category": "geographic_poi", + "offset": 34, + "length": 14, + "confidenceScore": 0.07 + }, + { + "text": "dramatic", + "category": "sort", + "offset": 64, + "length": 8, + "confidenceScore": 0.03 + }, + { + "text": "oil", + "category": "music_item", + "offset": 85, + "length": 3, + "confidenceScore": 0.06 + } + ], + "warnings": [] + }, + { + "id": "1", + "entities": [ + { + "text": "Berkshire Multifamily", + "category": "location_name", + "offset": 21, + "length": 21, + "confidenceScore": 0.46 + } + ], + "warnings": [] + } + ], + "errors": [], + "projectName": "88ee0f78-fbca-444d-98e2-7c4c8631e494", + "deploymentName": "88ee0f78-fbca-444d-98e2-7c4c8631e494" + } + }, + { + "lastUpdateDateTime": "2021-10-21T20:15:48.5783364Z", + "taskName": "RecognizeCustomEntities", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "entities": [ + { + "text": "recent", + "category": "object_select", + "offset": 2, + "length": 6, + "confidenceScore": 0.08 + }, + { + "text": "Government", + "category": "restaurant_name", + "offset": 23, + "length": 10, + "confidenceScore": 0.05 + }, + { + "text": "Office", + "category": "restaurant_name", + "offset": 49, + "length": 6, + "confidenceScore": 0.11 + }, + { + "text": "Accountability", + "category": "geographic_poi", + "offset": 34, + "length": 14, + "confidenceScore": 0.07 + }, + { + "text": "dramatic", + "category": "sort", + "offset": 64, + "length": 8, + "confidenceScore": 0.03 + }, + { + "text": "oil", + "category": "music_item", + "offset": 85, + "length": 3, + "confidenceScore": 0.06 + } + ], + "warnings": [] + }, + { + "id": "1", + "entities": [ + { + "text": "Berkshire Multifamily", + "category": "location_name", + "offset": 21, + "length": 21, + "confidenceScore": 0.46 + } + ], + "warnings": [] + } + ], + "errors": [], + "projectName": "88ee0f78-fbca-444d-98e2-7c4c8631e494", + "deploymentName": "88ee0f78-fbca-444d-98e2-7c4c8631e494" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "950362413", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticstestresources.cognitiveservices.azure.com/" + } +} \ No newline at end of file diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeEntitiesTests/RecognizeEntitiesWithMultipleActions.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeEntitiesTests/RecognizeEntitiesWithMultipleActions.json new file mode 100644 index 000000000000..76dc32f6a80f --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeEntitiesTests/RecognizeEntitiesWithMultipleActions.json @@ -0,0 +1,554 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Content-Length": "453", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-c2043953522b5c409fedc50dd40f4de4-817736411c2a2c4c-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "0923d0adeca73288c4a850a185762c69", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "1", + "text": "Microsoft was founded by Bill Gates and Paul Allen.", + "language": "en" + }, + { + "id": "2", + "text": "Microsoft fue fundado por Bill Gates y Paul Allen.", + "language": "es" + } + ] + }, + "tasks": { + "entityRecognitionTasks": [ + { + "parameters": { + "loggingOptOut": true, + "stringIndexType": "Utf16CodeUnit" + }, + "taskName": "RecognizeEntitiesWithDisabledServiceLogs" + }, + { + "parameters": { + "stringIndexType": "Utf16CodeUnit" + }, + "taskName": "RecognizeEntities" + } + ] + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "26429a1e-c741-4683-bbbc-938428807c8a", + "Date": "Wed, 20 Oct 2021 15:05:32 GMT", + "operation-location": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/d8d071b0-2e7a-446b-9c43-993b10e63840", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "476" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/d8d071b0-2e7a-446b-9c43-993b10e63840", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "3a39d7db401e5f5d2b7fe561c97b3d4e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "bc0e7f43-eded-4a4c-b665-ba24bbfb34e4", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:05:32 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "15" + }, + "ResponseBody": { + "jobId": "d8d071b0-2e7a-446b-9c43-993b10e63840", + "lastUpdateDateTime": "2021-10-20T15:05:32Z", + "createdDateTime": "2021-10-20T15:05:32Z", + "expirationDateTime": "2021-10-21T15:05:32Z", + "status": "notStarted", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/d8d071b0-2e7a-446b-9c43-993b10e63840", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "ad0eb5a68dc8ba01fae0c55b4729c61e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "312e505f-cece-4d0b-86f3-314ea1ea8d7a", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:05:33 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "6" + }, + "ResponseBody": { + "jobId": "d8d071b0-2e7a-446b-9c43-993b10e63840", + "lastUpdateDateTime": "2021-10-20T15:05:32Z", + "createdDateTime": "2021-10-20T15:05:32Z", + "expirationDateTime": "2021-10-21T15:05:32Z", + "status": "notStarted", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/d8d071b0-2e7a-446b-9c43-993b10e63840", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "faeed62b27d36daa73c4de2707266948", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "28176062-907f-4353-9038-bacfabd718c0", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:05:35 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "13" + }, + "ResponseBody": { + "jobId": "d8d071b0-2e7a-446b-9c43-993b10e63840", + "lastUpdateDateTime": "2021-10-20T15:05:32Z", + "createdDateTime": "2021-10-20T15:05:32Z", + "expirationDateTime": "2021-10-21T15:05:32Z", + "status": "notStarted", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/d8d071b0-2e7a-446b-9c43-993b10e63840", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "cffa016b7f674ea1d67e403e7b011801", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "37449b4f-607a-4151-80ef-53e3133c3cdf", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:05:36 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "7" + }, + "ResponseBody": { + "jobId": "d8d071b0-2e7a-446b-9c43-993b10e63840", + "lastUpdateDateTime": "2021-10-20T15:05:32Z", + "createdDateTime": "2021-10-20T15:05:32Z", + "expirationDateTime": "2021-10-21T15:05:32Z", + "status": "notStarted", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/d8d071b0-2e7a-446b-9c43-993b10e63840", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "f236c6b9438d7f7b0aa13a03aed9b3d4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "323352ee-288c-48b4-a332-f8f19efbf1bb", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:05:37 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "d8d071b0-2e7a-446b-9c43-993b10e63840", + "lastUpdateDateTime": "2021-10-20T15:05:32Z", + "createdDateTime": "2021-10-20T15:05:32Z", + "expirationDateTime": "2021-10-21T15:05:32Z", + "status": "notStarted", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/d8d071b0-2e7a-446b-9c43-993b10e63840", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "45f07c76f62facb7359f2454e76cf271", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "e563da47-0672-4370-9002-3a5c3d46fff8", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:05:39 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "7" + }, + "ResponseBody": { + "jobId": "d8d071b0-2e7a-446b-9c43-993b10e63840", + "lastUpdateDateTime": "2021-10-20T15:05:38Z", + "createdDateTime": "2021-10-20T15:05:32Z", + "expirationDateTime": "2021-10-21T15:05:32Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/d8d071b0-2e7a-446b-9c43-993b10e63840", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "406edcac77ef28bb867bc4c6459d9ffc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "2d747a5f-a054-4236-b6a6-28f63c3b7e1e", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:05:40 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "175" + }, + "ResponseBody": { + "jobId": "d8d071b0-2e7a-446b-9c43-993b10e63840", + "lastUpdateDateTime": "2021-10-20T15:05:40Z", + "createdDateTime": "2021-10-20T15:05:32Z", + "expirationDateTime": "2021-10-21T15:05:32Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "entityRecognitionTasks": [ + { + "lastUpdateDateTime": "2021-10-20T15:05:40.6172502Z", + "taskName": "RecognizeEntities", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "entities": [ + { + "text": "Microsoft", + "category": "Organization", + "offset": 0, + "length": 9, + "confidenceScore": 1.0 + }, + { + "text": "Bill Gates", + "category": "Person", + "offset": 25, + "length": 10, + "confidenceScore": 1.0 + }, + { + "text": "Paul Allen", + "category": "Person", + "offset": 40, + "length": 10, + "confidenceScore": 1.0 + } + ], + "warnings": [] + }, + { + "id": "2", + "entities": [ + { + "text": "Microsoft", + "category": "Organization", + "offset": 0, + "length": 9, + "confidenceScore": 1.0 + }, + { + "text": "Bill Gates", + "category": "Person", + "offset": 26, + "length": 10, + "confidenceScore": 1.0 + }, + { + "text": "Paul Allen", + "category": "Person", + "offset": 39, + "length": 10, + "confidenceScore": 0.99 + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-06-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/d8d071b0-2e7a-446b-9c43-993b10e63840", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "fec76ccad211c3d20f8abded1e26989e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "2db28292-6076-4253-a7d1-30e6ae2a49dd", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:05:41 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "157" + }, + "ResponseBody": { + "jobId": "d8d071b0-2e7a-446b-9c43-993b10e63840", + "lastUpdateDateTime": "2021-10-20T15:05:41Z", + "createdDateTime": "2021-10-20T15:05:32Z", + "expirationDateTime": "2021-10-21T15:05:32Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 2, + "failed": 0, + "inProgress": 0, + "total": 2, + "entityRecognitionTasks": [ + { + "lastUpdateDateTime": "2021-10-20T15:05:41.5795135Z", + "taskName": "RecognizeEntitiesWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "entities": [ + { + "text": "Microsoft", + "category": "Organization", + "offset": 0, + "length": 9, + "confidenceScore": 1.0 + }, + { + "text": "Bill Gates", + "category": "Person", + "offset": 25, + "length": 10, + "confidenceScore": 1.0 + }, + { + "text": "Paul Allen", + "category": "Person", + "offset": 40, + "length": 10, + "confidenceScore": 1.0 + } + ], + "warnings": [] + }, + { + "id": "2", + "entities": [ + { + "text": "Microsoft", + "category": "Organization", + "offset": 0, + "length": 9, + "confidenceScore": 1.0 + }, + { + "text": "Bill Gates", + "category": "Person", + "offset": 26, + "length": 10, + "confidenceScore": 1.0 + }, + { + "text": "Paul Allen", + "category": "Person", + "offset": 39, + "length": 10, + "confidenceScore": 0.99 + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-06-01" + } + }, + { + "lastUpdateDateTime": "2021-10-20T15:05:40.6172502Z", + "taskName": "RecognizeEntities", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "entities": [ + { + "text": "Microsoft", + "category": "Organization", + "offset": 0, + "length": 9, + "confidenceScore": 1.0 + }, + { + "text": "Bill Gates", + "category": "Person", + "offset": 25, + "length": 10, + "confidenceScore": 1.0 + }, + { + "text": "Paul Allen", + "category": "Person", + "offset": 40, + "length": 10, + "confidenceScore": 1.0 + } + ], + "warnings": [] + }, + { + "id": "2", + "entities": [ + { + "text": "Microsoft", + "category": "Organization", + "offset": 0, + "length": 9, + "confidenceScore": 1.0 + }, + { + "text": "Bill Gates", + "category": "Person", + "offset": 26, + "length": 10, + "confidenceScore": 1.0 + }, + { + "text": "Paul Allen", + "category": "Person", + "offset": 39, + "length": 10, + "confidenceScore": 0.99 + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-06-01" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "316125392", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticstestresources.cognitiveservices.azure.com/" + } +} \ No newline at end of file diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeEntitiesTests/RecognizeEntitiesWithMultipleActionsAsync.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeEntitiesTests/RecognizeEntitiesWithMultipleActionsAsync.json new file mode 100644 index 000000000000..294a1d1d6667 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeEntitiesTests/RecognizeEntitiesWithMultipleActionsAsync.json @@ -0,0 +1,487 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Content-Length": "453", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-471c85ea5ed7ec489c19966ad26b30b2-4f8b61c51fcec947-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "9c320a9b8f291b2f412bdd52e0e2139a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "1", + "text": "Microsoft was founded by Bill Gates and Paul Allen.", + "language": "en" + }, + { + "id": "2", + "text": "Microsoft fue fundado por Bill Gates y Paul Allen.", + "language": "es" + } + ] + }, + "tasks": { + "entityRecognitionTasks": [ + { + "parameters": { + "loggingOptOut": true, + "stringIndexType": "Utf16CodeUnit" + }, + "taskName": "RecognizeEntitiesWithDisabledServiceLogs" + }, + { + "parameters": { + "stringIndexType": "Utf16CodeUnit" + }, + "taskName": "RecognizeEntities" + } + ] + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "91e1c980-8bbd-4b8a-920e-e33d27963974", + "Date": "Wed, 20 Oct 2021 15:05:43 GMT", + "operation-location": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/fbbcda42-2e1f-47ca-bd31-a92245cc56aa", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "340" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/fbbcda42-2e1f-47ca-bd31-a92245cc56aa", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "483e5a9af59e2f2a108bee82bc3a28ac", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "1915eab1-d050-4339-a3e5-ac1d8ed4beb9", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:05:43 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "11" + }, + "ResponseBody": { + "jobId": "fbbcda42-2e1f-47ca-bd31-a92245cc56aa", + "lastUpdateDateTime": "2021-10-20T15:05:43Z", + "createdDateTime": "2021-10-20T15:05:43Z", + "expirationDateTime": "2021-10-21T15:05:43Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/fbbcda42-2e1f-47ca-bd31-a92245cc56aa", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "180f57150c5f727293308582edacfcc1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "8d5ef0e1-b44b-4927-9b70-6f055711e667", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:05:44 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "7" + }, + "ResponseBody": { + "jobId": "fbbcda42-2e1f-47ca-bd31-a92245cc56aa", + "lastUpdateDateTime": "2021-10-20T15:05:43Z", + "createdDateTime": "2021-10-20T15:05:43Z", + "expirationDateTime": "2021-10-21T15:05:43Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/fbbcda42-2e1f-47ca-bd31-a92245cc56aa", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "591a9b09d482a699e0038b9da1ad5f06", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "d3787d09-b508-4369-81e9-92d68c8cd8b2", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:05:45 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "7" + }, + "ResponseBody": { + "jobId": "fbbcda42-2e1f-47ca-bd31-a92245cc56aa", + "lastUpdateDateTime": "2021-10-20T15:05:43Z", + "createdDateTime": "2021-10-20T15:05:43Z", + "expirationDateTime": "2021-10-21T15:05:43Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/fbbcda42-2e1f-47ca-bd31-a92245cc56aa", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "893c3002fbd38e3ae8cbb46d6fa84164", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "6f55325a-fcb6-40ac-86f9-e86e47909340", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:05:46 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "10" + }, + "ResponseBody": { + "jobId": "fbbcda42-2e1f-47ca-bd31-a92245cc56aa", + "lastUpdateDateTime": "2021-10-20T15:05:43Z", + "createdDateTime": "2021-10-20T15:05:43Z", + "expirationDateTime": "2021-10-21T15:05:43Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/fbbcda42-2e1f-47ca-bd31-a92245cc56aa", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "21792c8ece20412abd68385c80d4d1e5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "1568ae5e-0912-4141-922e-0facb6c5586e", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:05:48 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "9" + }, + "ResponseBody": { + "jobId": "fbbcda42-2e1f-47ca-bd31-a92245cc56aa", + "lastUpdateDateTime": "2021-10-20T15:05:43Z", + "createdDateTime": "2021-10-20T15:05:43Z", + "expirationDateTime": "2021-10-21T15:05:43Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/fbbcda42-2e1f-47ca-bd31-a92245cc56aa", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "bc7f7fd1736f0dee608c71b61f2c3737", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "07fff414-adc5-44c9-a232-f43e99f75997", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:05:49 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "9" + }, + "ResponseBody": { + "jobId": "fbbcda42-2e1f-47ca-bd31-a92245cc56aa", + "lastUpdateDateTime": "2021-10-20T15:05:49Z", + "createdDateTime": "2021-10-20T15:05:43Z", + "expirationDateTime": "2021-10-21T15:05:43Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/fbbcda42-2e1f-47ca-bd31-a92245cc56aa", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "740e27c13d3434e606fbcb6ac3de0d13", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "1138789d-f853-4021-a4f0-172aad344ecf", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:05:50 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "fbbcda42-2e1f-47ca-bd31-a92245cc56aa", + "lastUpdateDateTime": "2021-10-20T15:05:51Z", + "createdDateTime": "2021-10-20T15:05:43Z", + "expirationDateTime": "2021-10-21T15:05:43Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/fbbcda42-2e1f-47ca-bd31-a92245cc56aa", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "f09bcefa85281af43e6bc0935d732191", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "c4ef3528-5a2a-4ee4-bd15-64300b9f5e4e", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:05:51 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "129" + }, + "ResponseBody": { + "jobId": "fbbcda42-2e1f-47ca-bd31-a92245cc56aa", + "lastUpdateDateTime": "2021-10-20T15:05:52Z", + "createdDateTime": "2021-10-20T15:05:43Z", + "expirationDateTime": "2021-10-21T15:05:43Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 2, + "failed": 0, + "inProgress": 0, + "total": 2, + "entityRecognitionTasks": [ + { + "lastUpdateDateTime": "2021-10-20T15:05:52.1412892Z", + "taskName": "RecognizeEntitiesWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "entities": [ + { + "text": "Microsoft", + "category": "Organization", + "offset": 0, + "length": 9, + "confidenceScore": 1.0 + }, + { + "text": "Bill Gates", + "category": "Person", + "offset": 25, + "length": 10, + "confidenceScore": 1.0 + }, + { + "text": "Paul Allen", + "category": "Person", + "offset": 40, + "length": 10, + "confidenceScore": 1.0 + } + ], + "warnings": [] + }, + { + "id": "2", + "entities": [ + { + "text": "Microsoft", + "category": "Organization", + "offset": 0, + "length": 9, + "confidenceScore": 1.0 + }, + { + "text": "Bill Gates", + "category": "Person", + "offset": 26, + "length": 10, + "confidenceScore": 1.0 + }, + { + "text": "Paul Allen", + "category": "Person", + "offset": 39, + "length": 10, + "confidenceScore": 0.99 + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-06-01" + } + }, + { + "lastUpdateDateTime": "2021-10-20T15:05:51.1730364Z", + "taskName": "RecognizeEntities", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "entities": [ + { + "text": "Microsoft", + "category": "Organization", + "offset": 0, + "length": 9, + "confidenceScore": 1.0 + }, + { + "text": "Bill Gates", + "category": "Person", + "offset": 25, + "length": 10, + "confidenceScore": 1.0 + }, + { + "text": "Paul Allen", + "category": "Person", + "offset": 40, + "length": 10, + "confidenceScore": 1.0 + } + ], + "warnings": [] + }, + { + "id": "2", + "entities": [ + { + "text": "Microsoft", + "category": "Organization", + "offset": 0, + "length": 9, + "confidenceScore": 1.0 + }, + { + "text": "Bill Gates", + "category": "Person", + "offset": 26, + "length": 10, + "confidenceScore": 1.0 + }, + { + "text": "Paul Allen", + "category": "Person", + "offset": 39, + "length": 10, + "confidenceScore": 0.99 + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-06-01" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "1459416548", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticstestresources.cognitiveservices.azure.com/" + } +} \ No newline at end of file diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeLinkedEntitiesTests/RecognizeLinkedEntitiesWithMultipleActions.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeLinkedEntitiesTests/RecognizeLinkedEntitiesWithMultipleActions.json new file mode 100644 index 000000000000..ada71210c6f2 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeLinkedEntitiesTests/RecognizeLinkedEntitiesWithMultipleActions.json @@ -0,0 +1,824 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Content-Length": "461", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-cb0ad4c1cf29a0458a4403689d09f3b5-1e2a20a194ff2742-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "476929731fb859169740acaba5ee9ed6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "1", + "text": "Microsoft was founded by Bill Gates and Paul Allen.", + "language": "en" + }, + { + "id": "3", + "text": "Microsoft fue fundado por Bill Gates y Paul Allen.", + "language": "es" + } + ] + }, + "tasks": { + "entityLinkingTasks": [ + { + "parameters": { + "loggingOptOut": true, + "stringIndexType": "Utf16CodeUnit" + }, + "taskName": "RecognizeLinkedEntitiesWithDisabledServiceLogs" + }, + { + "parameters": { + "stringIndexType": "Utf16CodeUnit" + }, + "taskName": "RecognizeLinkedEntities" + } + ] + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "ecd80dff-602c-4ffd-834f-7a7b9a3ddafc", + "Date": "Wed, 20 Oct 2021 15:06:35 GMT", + "operation-location": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/bd3ed8ac-0b57-4e06-9976-46f9c6503292", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "346" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/bd3ed8ac-0b57-4e06-9976-46f9c6503292", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "4cbe073f3d3eebf1605108fd45983580", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "16c88913-76e5-4ad3-a491-5ffb0bec610e", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:06:35 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "bd3ed8ac-0b57-4e06-9976-46f9c6503292", + "lastUpdateDateTime": "2021-10-20T15:06:35Z", + "createdDateTime": "2021-10-20T15:06:35Z", + "expirationDateTime": "2021-10-21T15:06:35Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/bd3ed8ac-0b57-4e06-9976-46f9c6503292", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "d1c5b125e3ca39de7995125b7dbcd6fe", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "5da5a7c7-0a00-462c-99f7-21a0846f45f7", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:06:37 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "bd3ed8ac-0b57-4e06-9976-46f9c6503292", + "lastUpdateDateTime": "2021-10-20T15:06:35Z", + "createdDateTime": "2021-10-20T15:06:35Z", + "expirationDateTime": "2021-10-21T15:06:35Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/bd3ed8ac-0b57-4e06-9976-46f9c6503292", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "574d387fb3e53516387ee667161914ff", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "55bbef8c-9c42-4da6-9a6d-d0205a1c1d1a", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:06:38 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "19" + }, + "ResponseBody": { + "jobId": "bd3ed8ac-0b57-4e06-9976-46f9c6503292", + "lastUpdateDateTime": "2021-10-20T15:06:35Z", + "createdDateTime": "2021-10-20T15:06:35Z", + "expirationDateTime": "2021-10-21T15:06:35Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/bd3ed8ac-0b57-4e06-9976-46f9c6503292", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "f3862b0bcd295b0c2984d3a82b956da3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "36e72162-db94-4dcf-bedb-54e2bb4fe1e4", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:06:39 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "bd3ed8ac-0b57-4e06-9976-46f9c6503292", + "lastUpdateDateTime": "2021-10-20T15:06:35Z", + "createdDateTime": "2021-10-20T15:06:35Z", + "expirationDateTime": "2021-10-21T15:06:35Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/bd3ed8ac-0b57-4e06-9976-46f9c6503292", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "0c7e097ade4a719b9a8f984bfd762360", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "628bb95c-7753-47d3-9ec1-bffa0caace70", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:06:40 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "6" + }, + "ResponseBody": { + "jobId": "bd3ed8ac-0b57-4e06-9976-46f9c6503292", + "lastUpdateDateTime": "2021-10-20T15:06:35Z", + "createdDateTime": "2021-10-20T15:06:35Z", + "expirationDateTime": "2021-10-21T15:06:35Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/bd3ed8ac-0b57-4e06-9976-46f9c6503292", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "514f1381e236b1d52cf12e61e06d0aa2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "d49428f4-cce0-46bd-af4d-59c561f78e38", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:06:42 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "29" + }, + "ResponseBody": { + "jobId": "bd3ed8ac-0b57-4e06-9976-46f9c6503292", + "lastUpdateDateTime": "2021-10-20T15:06:35Z", + "createdDateTime": "2021-10-20T15:06:35Z", + "expirationDateTime": "2021-10-21T15:06:35Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/bd3ed8ac-0b57-4e06-9976-46f9c6503292", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "0cec4210089a2db49014599934c15eb2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "7401a1fc-34b2-4959-8765-220008c5c642", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:06:43 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "37" + }, + "ResponseBody": { + "jobId": "bd3ed8ac-0b57-4e06-9976-46f9c6503292", + "lastUpdateDateTime": "2021-10-20T15:06:35Z", + "createdDateTime": "2021-10-20T15:06:35Z", + "expirationDateTime": "2021-10-21T15:06:35Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/bd3ed8ac-0b57-4e06-9976-46f9c6503292", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "172773611b45986d34cce059af3a912d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "63e2c937-68e5-4c5d-b4c7-de4d97eb9226", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:06:44 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "79" + }, + "ResponseBody": { + "jobId": "bd3ed8ac-0b57-4e06-9976-46f9c6503292", + "lastUpdateDateTime": "2021-10-20T15:06:35Z", + "createdDateTime": "2021-10-20T15:06:35Z", + "expirationDateTime": "2021-10-21T15:06:35Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/bd3ed8ac-0b57-4e06-9976-46f9c6503292", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "ba3af685168978c55f22c121893c7c6a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "aa94bf79-5465-40b9-86ff-e2047070621f", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:06:46 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "219" + }, + "ResponseBody": { + "jobId": "bd3ed8ac-0b57-4e06-9976-46f9c6503292", + "lastUpdateDateTime": "2021-10-20T15:06:45Z", + "createdDateTime": "2021-10-20T15:06:35Z", + "expirationDateTime": "2021-10-21T15:06:35Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "entityLinkingTasks": [ + { + "lastUpdateDateTime": "2021-10-20T15:06:45.2525333Z", + "taskName": "RecognizeLinkedEntitiesWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "entities": [ + { + "bingId": "a093e9b9-90f5-a3d5-c4b8-5855e1b01f85", + "name": "Microsoft", + "matches": [ + { + "text": "Microsoft", + "offset": 0, + "length": 9, + "confidenceScore": 0.49 + } + ], + "language": "en", + "id": "Microsoft", + "url": "https://en.wikipedia.org/wiki/Microsoft", + "dataSource": "Wikipedia" + }, + { + "bingId": "0d47c987-0042-5576-15e8-97af601614fa", + "name": "Bill Gates", + "matches": [ + { + "text": "Bill Gates", + "offset": 25, + "length": 10, + "confidenceScore": 0.52 + } + ], + "language": "en", + "id": "Bill Gates", + "url": "https://en.wikipedia.org/wiki/Bill_Gates", + "dataSource": "Wikipedia" + }, + { + "bingId": "df2c4376-9923-6a54-893f-2ee5a5badbc7", + "name": "Paul Allen", + "matches": [ + { + "text": "Paul Allen", + "offset": 40, + "length": 10, + "confidenceScore": 0.54 + } + ], + "language": "en", + "id": "Paul Allen", + "url": "https://en.wikipedia.org/wiki/Paul_Allen", + "dataSource": "Wikipedia" + } + ], + "warnings": [] + }, + { + "id": "3", + "entities": [ + { + "bingId": "a093e9b9-90f5-a3d5-c4b8-5855e1b01f85", + "name": "Microsoft", + "matches": [ + { + "text": "Microsoft", + "offset": 0, + "length": 9, + "confidenceScore": 0.38 + } + ], + "language": "es", + "id": "Microsoft", + "url": "https://es.wikipedia.org/wiki/Microsoft", + "dataSource": "Wikipedia" + }, + { + "bingId": "0d47c987-0042-5576-15e8-97af601614fa", + "name": "Bill Gates", + "matches": [ + { + "text": "Bill Gates", + "offset": 26, + "length": 10, + "confidenceScore": 0.37 + } + ], + "language": "es", + "id": "Bill Gates", + "url": "https://es.wikipedia.org/wiki/Bill_Gates", + "dataSource": "Wikipedia" + }, + { + "bingId": "df2c4376-9923-6a54-893f-2ee5a5badbc7", + "name": "Paul Allen", + "matches": [ + { + "text": "Paul Allen", + "offset": 39, + "length": 10, + "confidenceScore": 0.9 + } + ], + "language": "es", + "id": "Paul Allen", + "url": "https://es.wikipedia.org/wiki/Paul_Allen", + "dataSource": "Wikipedia" + } + ], + "warnings": [] + } + ], + "errors": [ + { + "id": "3", + "error": { + "code": "InvalidArgument", + "message": "Invalid Language Code.", + "innererror": { + "code": "UnsupportedLanguageCode", + "message": "Invalid language code. Supported languages: en. For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition" + } + } + } + ], + "modelVersion": "2021-06-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/bd3ed8ac-0b57-4e06-9976-46f9c6503292", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "6cff7b93f245f55cd554d8cd285a7d56", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "6f6ed977-45fb-407f-a4a5-f6a7e7eb47f6", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:06:47 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "216" + }, + "ResponseBody": { + "jobId": "bd3ed8ac-0b57-4e06-9976-46f9c6503292", + "lastUpdateDateTime": "2021-10-20T15:06:47Z", + "createdDateTime": "2021-10-20T15:06:35Z", + "expirationDateTime": "2021-10-21T15:06:35Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 2, + "failed": 0, + "inProgress": 0, + "total": 2, + "entityLinkingTasks": [ + { + "lastUpdateDateTime": "2021-10-20T15:06:45.2525333Z", + "taskName": "RecognizeLinkedEntitiesWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "entities": [ + { + "bingId": "a093e9b9-90f5-a3d5-c4b8-5855e1b01f85", + "name": "Microsoft", + "matches": [ + { + "text": "Microsoft", + "offset": 0, + "length": 9, + "confidenceScore": 0.49 + } + ], + "language": "en", + "id": "Microsoft", + "url": "https://en.wikipedia.org/wiki/Microsoft", + "dataSource": "Wikipedia" + }, + { + "bingId": "0d47c987-0042-5576-15e8-97af601614fa", + "name": "Bill Gates", + "matches": [ + { + "text": "Bill Gates", + "offset": 25, + "length": 10, + "confidenceScore": 0.52 + } + ], + "language": "en", + "id": "Bill Gates", + "url": "https://en.wikipedia.org/wiki/Bill_Gates", + "dataSource": "Wikipedia" + }, + { + "bingId": "df2c4376-9923-6a54-893f-2ee5a5badbc7", + "name": "Paul Allen", + "matches": [ + { + "text": "Paul Allen", + "offset": 40, + "length": 10, + "confidenceScore": 0.54 + } + ], + "language": "en", + "id": "Paul Allen", + "url": "https://en.wikipedia.org/wiki/Paul_Allen", + "dataSource": "Wikipedia" + } + ], + "warnings": [] + }, + { + "id": "3", + "entities": [ + { + "bingId": "a093e9b9-90f5-a3d5-c4b8-5855e1b01f85", + "name": "Microsoft", + "matches": [ + { + "text": "Microsoft", + "offset": 0, + "length": 9, + "confidenceScore": 0.38 + } + ], + "language": "es", + "id": "Microsoft", + "url": "https://es.wikipedia.org/wiki/Microsoft", + "dataSource": "Wikipedia" + }, + { + "bingId": "0d47c987-0042-5576-15e8-97af601614fa", + "name": "Bill Gates", + "matches": [ + { + "text": "Bill Gates", + "offset": 26, + "length": 10, + "confidenceScore": 0.37 + } + ], + "language": "es", + "id": "Bill Gates", + "url": "https://es.wikipedia.org/wiki/Bill_Gates", + "dataSource": "Wikipedia" + }, + { + "bingId": "df2c4376-9923-6a54-893f-2ee5a5badbc7", + "name": "Paul Allen", + "matches": [ + { + "text": "Paul Allen", + "offset": 39, + "length": 10, + "confidenceScore": 0.9 + } + ], + "language": "es", + "id": "Paul Allen", + "url": "https://es.wikipedia.org/wiki/Paul_Allen", + "dataSource": "Wikipedia" + } + ], + "warnings": [] + } + ], + "errors": [ + { + "id": "3", + "error": { + "code": "InvalidArgument", + "message": "Invalid Language Code.", + "innererror": { + "code": "UnsupportedLanguageCode", + "message": "Invalid language code. Supported languages: en. For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition" + } + } + } + ], + "modelVersion": "2021-06-01" + } + }, + { + "lastUpdateDateTime": "2021-10-20T15:06:47.3879083Z", + "taskName": "RecognizeLinkedEntities", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "entities": [ + { + "bingId": "a093e9b9-90f5-a3d5-c4b8-5855e1b01f85", + "name": "Microsoft", + "matches": [ + { + "text": "Microsoft", + "offset": 0, + "length": 9, + "confidenceScore": 0.49 + } + ], + "language": "en", + "id": "Microsoft", + "url": "https://en.wikipedia.org/wiki/Microsoft", + "dataSource": "Wikipedia" + }, + { + "bingId": "0d47c987-0042-5576-15e8-97af601614fa", + "name": "Bill Gates", + "matches": [ + { + "text": "Bill Gates", + "offset": 25, + "length": 10, + "confidenceScore": 0.52 + } + ], + "language": "en", + "id": "Bill Gates", + "url": "https://en.wikipedia.org/wiki/Bill_Gates", + "dataSource": "Wikipedia" + }, + { + "bingId": "df2c4376-9923-6a54-893f-2ee5a5badbc7", + "name": "Paul Allen", + "matches": [ + { + "text": "Paul Allen", + "offset": 40, + "length": 10, + "confidenceScore": 0.54 + } + ], + "language": "en", + "id": "Paul Allen", + "url": "https://en.wikipedia.org/wiki/Paul_Allen", + "dataSource": "Wikipedia" + } + ], + "warnings": [] + }, + { + "id": "3", + "entities": [ + { + "bingId": "a093e9b9-90f5-a3d5-c4b8-5855e1b01f85", + "name": "Microsoft", + "matches": [ + { + "text": "Microsoft", + "offset": 0, + "length": 9, + "confidenceScore": 0.38 + } + ], + "language": "es", + "id": "Microsoft", + "url": "https://es.wikipedia.org/wiki/Microsoft", + "dataSource": "Wikipedia" + }, + { + "bingId": "0d47c987-0042-5576-15e8-97af601614fa", + "name": "Bill Gates", + "matches": [ + { + "text": "Bill Gates", + "offset": 26, + "length": 10, + "confidenceScore": 0.37 + } + ], + "language": "es", + "id": "Bill Gates", + "url": "https://es.wikipedia.org/wiki/Bill_Gates", + "dataSource": "Wikipedia" + }, + { + "bingId": "df2c4376-9923-6a54-893f-2ee5a5badbc7", + "name": "Paul Allen", + "matches": [ + { + "text": "Paul Allen", + "offset": 39, + "length": 10, + "confidenceScore": 0.9 + } + ], + "language": "es", + "id": "Paul Allen", + "url": "https://es.wikipedia.org/wiki/Paul_Allen", + "dataSource": "Wikipedia" + } + ], + "warnings": [] + } + ], + "errors": [ + { + "id": "3", + "error": { + "code": "InvalidArgument", + "message": "Invalid Language Code.", + "innererror": { + "code": "UnsupportedLanguageCode", + "message": "Invalid language code. Supported languages: en. For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition" + } + } + } + ], + "modelVersion": "2021-06-01" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "1177529321", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticstestresources.cognitiveservices.azure.com/" + } +} \ No newline at end of file diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeLinkedEntitiesTests/RecognizeLinkedEntitiesWithMultipleActionsAsync.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeLinkedEntitiesTests/RecognizeLinkedEntitiesWithMultipleActionsAsync.json new file mode 100644 index 000000000000..0b2df23949f8 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizeLinkedEntitiesTests/RecognizeLinkedEntitiesWithMultipleActionsAsync.json @@ -0,0 +1,1220 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Content-Length": "461", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-0af1a1ab26a6c047a9ea45d183fe5cb3-f5b8973fa352c645-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "a7a23cc678c67f8bea6d7fcaeff39d88", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "1", + "text": "Microsoft was founded by Bill Gates and Paul Allen.", + "language": "en" + }, + { + "id": "3", + "text": "Microsoft fue fundado por Bill Gates y Paul Allen.", + "language": "es" + } + ] + }, + "tasks": { + "entityLinkingTasks": [ + { + "parameters": { + "loggingOptOut": true, + "stringIndexType": "Utf16CodeUnit" + }, + "taskName": "RecognizeLinkedEntitiesWithDisabledServiceLogs" + }, + { + "parameters": { + "stringIndexType": "Utf16CodeUnit" + }, + "taskName": "RecognizeLinkedEntities" + } + ] + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "66362c59-02f9-430e-8159-4a856212f210", + "Date": "Wed, 20 Oct 2021 15:06:49 GMT", + "operation-location": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "686" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "9e6a41ab9a36538db2856c07a9e32f07", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "78d826a1-edb7-4d90-b081-a06dfa478eb4", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:06:49 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "7" + }, + "ResponseBody": { + "jobId": "7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "lastUpdateDateTime": "2021-10-20T15:06:49Z", + "createdDateTime": "2021-10-20T15:06:49Z", + "expirationDateTime": "2021-10-21T15:06:49Z", + "status": "notStarted", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "2a5f1f468abb8d3c9e7e25fe2bb3ffe0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "03aa712c-63b4-468b-ad70-b9820df2a938", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:06:50 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "10" + }, + "ResponseBody": { + "jobId": "7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "lastUpdateDateTime": "2021-10-20T15:06:49Z", + "createdDateTime": "2021-10-20T15:06:49Z", + "expirationDateTime": "2021-10-21T15:06:49Z", + "status": "notStarted", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "480cfa2e5ce12b78af4ef5400b83d606", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "8be046d9-6fc8-4a1a-848d-af468ccfa001", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:06:52 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "lastUpdateDateTime": "2021-10-20T15:06:49Z", + "createdDateTime": "2021-10-20T15:06:49Z", + "expirationDateTime": "2021-10-21T15:06:49Z", + "status": "notStarted", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "d084783e739320cc04dcffb8758e28fe", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "85c60725-f415-4b40-a232-500a3aa2020c", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:06:53 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "19" + }, + "ResponseBody": { + "jobId": "7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "lastUpdateDateTime": "2021-10-20T15:06:49Z", + "createdDateTime": "2021-10-20T15:06:49Z", + "expirationDateTime": "2021-10-21T15:06:49Z", + "status": "notStarted", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "aed98c86e7d7ea25a6347a6c94fb821b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "29e1243c-f307-4ba4-ae3d-1fbbcb9ff2ea", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:06:54 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "15" + }, + "ResponseBody": { + "jobId": "7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "lastUpdateDateTime": "2021-10-20T15:06:49Z", + "createdDateTime": "2021-10-20T15:06:49Z", + "expirationDateTime": "2021-10-21T15:06:49Z", + "status": "notStarted", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "b2c01ea72e2fba4d2deb43045cbfb520", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "f80eb6e5-681d-479a-8ef4-89a80701819d", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:06:56 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "28" + }, + "ResponseBody": { + "jobId": "7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "lastUpdateDateTime": "2021-10-20T15:06:56Z", + "createdDateTime": "2021-10-20T15:06:49Z", + "expirationDateTime": "2021-10-21T15:06:49Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "7fbaf62527aa562f529a295ff85f8c09", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "a62403b1-f45d-4222-9fa6-e9f30f632f1e", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:06:57 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "lastUpdateDateTime": "2021-10-20T15:06:56Z", + "createdDateTime": "2021-10-20T15:06:49Z", + "expirationDateTime": "2021-10-21T15:06:49Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "5710e45a76ce57cf3f1e81eba3218ee6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "21ab547d-717a-4465-bbc8-72aa17bafa81", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:06:59 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "13" + }, + "ResponseBody": { + "jobId": "7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "lastUpdateDateTime": "2021-10-20T15:06:56Z", + "createdDateTime": "2021-10-20T15:06:49Z", + "expirationDateTime": "2021-10-21T15:06:49Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "9d47597e03418070ef695f9504eec1cd", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "5b50183e-12ba-4f19-bb66-696b3f25f2d5", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:00 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "37" + }, + "ResponseBody": { + "jobId": "7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "lastUpdateDateTime": "2021-10-20T15:06:56Z", + "createdDateTime": "2021-10-20T15:06:49Z", + "expirationDateTime": "2021-10-21T15:06:49Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "77aa3a5f5eaeaf522763408ba644b331", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "121630c4-e652-421b-bd23-b42dcab985f5", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:01 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "7" + }, + "ResponseBody": { + "jobId": "7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "lastUpdateDateTime": "2021-10-20T15:06:56Z", + "createdDateTime": "2021-10-20T15:06:49Z", + "expirationDateTime": "2021-10-21T15:06:49Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "9ee0420bee1857c77490676416395251", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "0f8b4253-afcc-4244-8ca0-dab5f2e31e71", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:02 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "7" + }, + "ResponseBody": { + "jobId": "7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "lastUpdateDateTime": "2021-10-20T15:06:56Z", + "createdDateTime": "2021-10-20T15:06:49Z", + "expirationDateTime": "2021-10-21T15:06:49Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "698bb35d16771f38079776dec2e5d9ab", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "b3d56000-0605-44b4-9cf2-32aec02e092e", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:04 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "lastUpdateDateTime": "2021-10-20T15:06:56Z", + "createdDateTime": "2021-10-20T15:06:49Z", + "expirationDateTime": "2021-10-21T15:06:49Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "c2892db6220d71b47252031df7ed99ee", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "00a6c84e-f0a8-4eee-8f32-b4ed58e2d87f", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:05 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "7" + }, + "ResponseBody": { + "jobId": "7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "lastUpdateDateTime": "2021-10-20T15:06:56Z", + "createdDateTime": "2021-10-20T15:06:49Z", + "expirationDateTime": "2021-10-21T15:06:49Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "f22eef1049b8f5ba0ac0978178e9948f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "200cbcfa-739b-4a74-aa76-f273bca77d02", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:06 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "7" + }, + "ResponseBody": { + "jobId": "7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "lastUpdateDateTime": "2021-10-20T15:06:56Z", + "createdDateTime": "2021-10-20T15:06:49Z", + "expirationDateTime": "2021-10-21T15:06:49Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "e8aebcb790b03a43fe19f624131a2819", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "9515629f-3ef5-4a79-8d41-796fe47f9ee3", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:07 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "7" + }, + "ResponseBody": { + "jobId": "7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "lastUpdateDateTime": "2021-10-20T15:06:56Z", + "createdDateTime": "2021-10-20T15:06:49Z", + "expirationDateTime": "2021-10-21T15:06:49Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "d3cd87fde7b66cf27394b74c8b33f989", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "03d9787f-bac6-4b01-8bde-60957f83f37e", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:09 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "28" + }, + "ResponseBody": { + "jobId": "7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "lastUpdateDateTime": "2021-10-20T15:06:56Z", + "createdDateTime": "2021-10-20T15:06:49Z", + "expirationDateTime": "2021-10-21T15:06:49Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "3b6674beb03f803dabf4f39e5396e1f0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "96537742-930e-4f40-b36c-d92f065fc82e", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:10 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "lastUpdateDateTime": "2021-10-20T15:06:56Z", + "createdDateTime": "2021-10-20T15:06:49Z", + "expirationDateTime": "2021-10-21T15:06:49Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "f0837d98c11bcfd8c941751cd9f6afcb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "74507c5b-0874-4d5e-ad8e-a1deb95bbe51", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:11 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "9" + }, + "ResponseBody": { + "jobId": "7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "lastUpdateDateTime": "2021-10-20T15:06:56Z", + "createdDateTime": "2021-10-20T15:06:49Z", + "expirationDateTime": "2021-10-21T15:06:49Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "9f656d20edb34dda4a4d27c2f35319dc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "2c9dfa69-0cf5-404a-9975-228a07ea621c", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:12 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "14" + }, + "ResponseBody": { + "jobId": "7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "lastUpdateDateTime": "2021-10-20T15:06:56Z", + "createdDateTime": "2021-10-20T15:06:49Z", + "expirationDateTime": "2021-10-21T15:06:49Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "0db4c7b209affd6d9b9672fd3b21a6b4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "8f089faf-4059-4699-b7b5-10be80408c0b", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:13 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "122" + }, + "ResponseBody": { + "jobId": "7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "lastUpdateDateTime": "2021-10-20T15:07:13Z", + "createdDateTime": "2021-10-20T15:06:49Z", + "expirationDateTime": "2021-10-21T15:06:49Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "entityLinkingTasks": [ + { + "lastUpdateDateTime": "2021-10-20T15:07:13.2289228Z", + "taskName": "RecognizeLinkedEntitiesWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "entities": [ + { + "bingId": "a093e9b9-90f5-a3d5-c4b8-5855e1b01f85", + "name": "Microsoft", + "matches": [ + { + "text": "Microsoft", + "offset": 0, + "length": 9, + "confidenceScore": 0.49 + } + ], + "language": "en", + "id": "Microsoft", + "url": "https://en.wikipedia.org/wiki/Microsoft", + "dataSource": "Wikipedia" + }, + { + "bingId": "0d47c987-0042-5576-15e8-97af601614fa", + "name": "Bill Gates", + "matches": [ + { + "text": "Bill Gates", + "offset": 25, + "length": 10, + "confidenceScore": 0.52 + } + ], + "language": "en", + "id": "Bill Gates", + "url": "https://en.wikipedia.org/wiki/Bill_Gates", + "dataSource": "Wikipedia" + }, + { + "bingId": "df2c4376-9923-6a54-893f-2ee5a5badbc7", + "name": "Paul Allen", + "matches": [ + { + "text": "Paul Allen", + "offset": 40, + "length": 10, + "confidenceScore": 0.54 + } + ], + "language": "en", + "id": "Paul Allen", + "url": "https://en.wikipedia.org/wiki/Paul_Allen", + "dataSource": "Wikipedia" + } + ], + "warnings": [] + }, + { + "id": "3", + "entities": [ + { + "bingId": "a093e9b9-90f5-a3d5-c4b8-5855e1b01f85", + "name": "Microsoft", + "matches": [ + { + "text": "Microsoft", + "offset": 0, + "length": 9, + "confidenceScore": 0.38 + } + ], + "language": "es", + "id": "Microsoft", + "url": "https://es.wikipedia.org/wiki/Microsoft", + "dataSource": "Wikipedia" + }, + { + "bingId": "0d47c987-0042-5576-15e8-97af601614fa", + "name": "Bill Gates", + "matches": [ + { + "text": "Bill Gates", + "offset": 26, + "length": 10, + "confidenceScore": 0.37 + } + ], + "language": "es", + "id": "Bill Gates", + "url": "https://es.wikipedia.org/wiki/Bill_Gates", + "dataSource": "Wikipedia" + }, + { + "bingId": "df2c4376-9923-6a54-893f-2ee5a5badbc7", + "name": "Paul Allen", + "matches": [ + { + "text": "Paul Allen", + "offset": 39, + "length": 10, + "confidenceScore": 0.9 + } + ], + "language": "es", + "id": "Paul Allen", + "url": "https://es.wikipedia.org/wiki/Paul_Allen", + "dataSource": "Wikipedia" + } + ], + "warnings": [] + } + ], + "errors": [ + { + "id": "3", + "error": { + "code": "InvalidArgument", + "message": "Invalid Language Code.", + "innererror": { + "code": "UnsupportedLanguageCode", + "message": "Invalid language code. Supported languages: en. For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition" + } + } + } + ], + "modelVersion": "2021-06-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "e57e28444230aa3ca336a5ce9916dc75", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "68dec24c-32bd-4bf7-8a15-b445e8299643", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:15 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "222" + }, + "ResponseBody": { + "jobId": "7c80125d-9f58-4bf5-a561-e24536d8ab0c", + "lastUpdateDateTime": "2021-10-20T15:07:14Z", + "createdDateTime": "2021-10-20T15:06:49Z", + "expirationDateTime": "2021-10-21T15:06:49Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 2, + "failed": 0, + "inProgress": 0, + "total": 2, + "entityLinkingTasks": [ + { + "lastUpdateDateTime": "2021-10-20T15:07:13.2289228Z", + "taskName": "RecognizeLinkedEntitiesWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "entities": [ + { + "bingId": "a093e9b9-90f5-a3d5-c4b8-5855e1b01f85", + "name": "Microsoft", + "matches": [ + { + "text": "Microsoft", + "offset": 0, + "length": 9, + "confidenceScore": 0.49 + } + ], + "language": "en", + "id": "Microsoft", + "url": "https://en.wikipedia.org/wiki/Microsoft", + "dataSource": "Wikipedia" + }, + { + "bingId": "0d47c987-0042-5576-15e8-97af601614fa", + "name": "Bill Gates", + "matches": [ + { + "text": "Bill Gates", + "offset": 25, + "length": 10, + "confidenceScore": 0.52 + } + ], + "language": "en", + "id": "Bill Gates", + "url": "https://en.wikipedia.org/wiki/Bill_Gates", + "dataSource": "Wikipedia" + }, + { + "bingId": "df2c4376-9923-6a54-893f-2ee5a5badbc7", + "name": "Paul Allen", + "matches": [ + { + "text": "Paul Allen", + "offset": 40, + "length": 10, + "confidenceScore": 0.54 + } + ], + "language": "en", + "id": "Paul Allen", + "url": "https://en.wikipedia.org/wiki/Paul_Allen", + "dataSource": "Wikipedia" + } + ], + "warnings": [] + }, + { + "id": "3", + "entities": [ + { + "bingId": "a093e9b9-90f5-a3d5-c4b8-5855e1b01f85", + "name": "Microsoft", + "matches": [ + { + "text": "Microsoft", + "offset": 0, + "length": 9, + "confidenceScore": 0.38 + } + ], + "language": "es", + "id": "Microsoft", + "url": "https://es.wikipedia.org/wiki/Microsoft", + "dataSource": "Wikipedia" + }, + { + "bingId": "0d47c987-0042-5576-15e8-97af601614fa", + "name": "Bill Gates", + "matches": [ + { + "text": "Bill Gates", + "offset": 26, + "length": 10, + "confidenceScore": 0.37 + } + ], + "language": "es", + "id": "Bill Gates", + "url": "https://es.wikipedia.org/wiki/Bill_Gates", + "dataSource": "Wikipedia" + }, + { + "bingId": "df2c4376-9923-6a54-893f-2ee5a5badbc7", + "name": "Paul Allen", + "matches": [ + { + "text": "Paul Allen", + "offset": 39, + "length": 10, + "confidenceScore": 0.9 + } + ], + "language": "es", + "id": "Paul Allen", + "url": "https://es.wikipedia.org/wiki/Paul_Allen", + "dataSource": "Wikipedia" + } + ], + "warnings": [] + } + ], + "errors": [ + { + "id": "3", + "error": { + "code": "InvalidArgument", + "message": "Invalid Language Code.", + "innererror": { + "code": "UnsupportedLanguageCode", + "message": "Invalid language code. Supported languages: en. For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition" + } + } + } + ], + "modelVersion": "2021-06-01" + } + }, + { + "lastUpdateDateTime": "2021-10-20T15:07:14.2875044Z", + "taskName": "RecognizeLinkedEntities", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "1", + "entities": [ + { + "bingId": "a093e9b9-90f5-a3d5-c4b8-5855e1b01f85", + "name": "Microsoft", + "matches": [ + { + "text": "Microsoft", + "offset": 0, + "length": 9, + "confidenceScore": 0.49 + } + ], + "language": "en", + "id": "Microsoft", + "url": "https://en.wikipedia.org/wiki/Microsoft", + "dataSource": "Wikipedia" + }, + { + "bingId": "0d47c987-0042-5576-15e8-97af601614fa", + "name": "Bill Gates", + "matches": [ + { + "text": "Bill Gates", + "offset": 25, + "length": 10, + "confidenceScore": 0.52 + } + ], + "language": "en", + "id": "Bill Gates", + "url": "https://en.wikipedia.org/wiki/Bill_Gates", + "dataSource": "Wikipedia" + }, + { + "bingId": "df2c4376-9923-6a54-893f-2ee5a5badbc7", + "name": "Paul Allen", + "matches": [ + { + "text": "Paul Allen", + "offset": 40, + "length": 10, + "confidenceScore": 0.54 + } + ], + "language": "en", + "id": "Paul Allen", + "url": "https://en.wikipedia.org/wiki/Paul_Allen", + "dataSource": "Wikipedia" + } + ], + "warnings": [] + }, + { + "id": "3", + "entities": [ + { + "bingId": "a093e9b9-90f5-a3d5-c4b8-5855e1b01f85", + "name": "Microsoft", + "matches": [ + { + "text": "Microsoft", + "offset": 0, + "length": 9, + "confidenceScore": 0.38 + } + ], + "language": "es", + "id": "Microsoft", + "url": "https://es.wikipedia.org/wiki/Microsoft", + "dataSource": "Wikipedia" + }, + { + "bingId": "0d47c987-0042-5576-15e8-97af601614fa", + "name": "Bill Gates", + "matches": [ + { + "text": "Bill Gates", + "offset": 26, + "length": 10, + "confidenceScore": 0.37 + } + ], + "language": "es", + "id": "Bill Gates", + "url": "https://es.wikipedia.org/wiki/Bill_Gates", + "dataSource": "Wikipedia" + }, + { + "bingId": "df2c4376-9923-6a54-893f-2ee5a5badbc7", + "name": "Paul Allen", + "matches": [ + { + "text": "Paul Allen", + "offset": 39, + "length": 10, + "confidenceScore": 0.9 + } + ], + "language": "es", + "id": "Paul Allen", + "url": "https://es.wikipedia.org/wiki/Paul_Allen", + "dataSource": "Wikipedia" + } + ], + "warnings": [] + } + ], + "errors": [ + { + "id": "3", + "error": { + "code": "InvalidArgument", + "message": "Invalid Language Code.", + "innererror": { + "code": "UnsupportedLanguageCode", + "message": "Invalid language code. Supported languages: en. For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition" + } + } + } + ], + "modelVersion": "2021-06-01" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "414547090", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticstestresources.cognitiveservices.azure.com/" + } +} \ No newline at end of file diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizePiiEntitiesTests/RecognizePiiEntitiesWithMultipleActions.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizePiiEntitiesTests/RecognizePiiEntitiesWithMultipleActions.json new file mode 100644 index 000000000000..da8e849b45bf --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizePiiEntitiesTests/RecognizePiiEntitiesWithMultipleActions.json @@ -0,0 +1,469 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Content-Length": "588", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-6b5fc17c3ba83245b053aeec6f4c2d0c-a10397b5db32e845-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "71a64eb3d44b2ad9d3eec8afa979abd4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "1", + "text": "A developer with SSN 859-98-0987 whose phone number is 800-102-1100 is building tools with our APIs. They work at Microsoft", + "language": "en" + }, + { + "id": "2", + "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check", + "language": "en" + } + ] + }, + "tasks": { + "entityRecognitionPiiTasks": [ + { + "parameters": { + "loggingOptOut": true, + "stringIndexType": "Utf16CodeUnit" + }, + "taskName": "RecognizePiiEntitiesWithDisabledServiceLogs" + }, + { + "parameters": { + "stringIndexType": "Utf16CodeUnit" + }, + "taskName": "RecognizePiiEntities" + } + ] + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "09d3edea-4346-4fc9-b57e-193998d21152", + "Date": "Wed, 20 Oct 2021 15:07:35 GMT", + "operation-location": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/18a30105-f855-4244-b2f5-cc8bbd0f203f", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "572" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/18a30105-f855-4244-b2f5-cc8bbd0f203f", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "d0f83f6ccaae3c668e95979f3babb254", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "25082bd3-f621-4929-a32b-3c6bffa6eca6", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:35 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "18a30105-f855-4244-b2f5-cc8bbd0f203f", + "lastUpdateDateTime": "2021-10-20T15:07:35Z", + "createdDateTime": "2021-10-20T15:07:35Z", + "expirationDateTime": "2021-10-21T15:07:35Z", + "status": "notStarted", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/18a30105-f855-4244-b2f5-cc8bbd0f203f", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "d595b2e2f0096ee74252e6600eb4920c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "21b57b25-3c6f-4849-a7dc-727c4dc6d412", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:36 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "42" + }, + "ResponseBody": { + "jobId": "18a30105-f855-4244-b2f5-cc8bbd0f203f", + "lastUpdateDateTime": "2021-10-20T15:07:35Z", + "createdDateTime": "2021-10-20T15:07:35Z", + "expirationDateTime": "2021-10-21T15:07:35Z", + "status": "notStarted", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/18a30105-f855-4244-b2f5-cc8bbd0f203f", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "83ba0843ec14e9cbe86ae2b53c3aef27", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "f9feff79-a924-44c4-9ce0-04938320b398", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:38 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "6" + }, + "ResponseBody": { + "jobId": "18a30105-f855-4244-b2f5-cc8bbd0f203f", + "lastUpdateDateTime": "2021-10-20T15:07:35Z", + "createdDateTime": "2021-10-20T15:07:35Z", + "expirationDateTime": "2021-10-21T15:07:35Z", + "status": "notStarted", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/18a30105-f855-4244-b2f5-cc8bbd0f203f", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "f7cc733cd5e47bcb588a8d5be3062dda", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "53c1cd0f-2eb0-4f02-b36e-4f788abd143a", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:39 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "12" + }, + "ResponseBody": { + "jobId": "18a30105-f855-4244-b2f5-cc8bbd0f203f", + "lastUpdateDateTime": "2021-10-20T15:07:35Z", + "createdDateTime": "2021-10-20T15:07:35Z", + "expirationDateTime": "2021-10-21T15:07:35Z", + "status": "notStarted", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/18a30105-f855-4244-b2f5-cc8bbd0f203f", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "325b8b032ff1f540e7abed9e0e313108", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "64f1e631-5276-44a8-a926-2c4abb7ebe90", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:40 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "18a30105-f855-4244-b2f5-cc8bbd0f203f", + "lastUpdateDateTime": "2021-10-20T15:07:35Z", + "createdDateTime": "2021-10-20T15:07:35Z", + "expirationDateTime": "2021-10-21T15:07:35Z", + "status": "notStarted", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/18a30105-f855-4244-b2f5-cc8bbd0f203f", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "9a23bf639be76d273d3f2b895f6f06e1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "129fdbb5-cb97-4ff9-870d-84de2adf6307", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:41 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "18a30105-f855-4244-b2f5-cc8bbd0f203f", + "lastUpdateDateTime": "2021-10-20T15:07:41Z", + "createdDateTime": "2021-10-20T15:07:35Z", + "expirationDateTime": "2021-10-21T15:07:35Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/18a30105-f855-4244-b2f5-cc8bbd0f203f", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "b1b2083cbcde0c3633d70f38e82c6d26", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "0ef0309f-7993-41ef-8f59-40f648825b73", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:43 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "210" + }, + "ResponseBody": { + "jobId": "18a30105-f855-4244-b2f5-cc8bbd0f203f", + "lastUpdateDateTime": "2021-10-20T15:07:43Z", + "createdDateTime": "2021-10-20T15:07:35Z", + "expirationDateTime": "2021-10-21T15:07:35Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 2, + "failed": 0, + "inProgress": 0, + "total": 2, + "entityRecognitionPiiTasks": [ + { + "lastUpdateDateTime": "2021-10-20T15:07:43.4184927Z", + "taskName": "RecognizePiiEntitiesWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "redactedText": "A ********* with SSN *********** whose phone number is ************ is building tools with our APIs. They work at *********", + "id": "1", + "entities": [ + { + "text": "developer", + "category": "PersonType", + "offset": 2, + "length": 9, + "confidenceScore": 0.97 + }, + { + "text": "859-98-0987", + "category": "USSocialSecurityNumber", + "offset": 21, + "length": 11, + "confidenceScore": 0.65 + }, + { + "text": "800-102-1100", + "category": "PhoneNumber", + "offset": 55, + "length": 12, + "confidenceScore": 0.8 + }, + { + "text": "Microsoft", + "category": "Organization", + "offset": 114, + "length": 9, + "confidenceScore": 0.96 + } + ], + "warnings": [] + }, + { + "redactedText": "Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check", + "id": "2", + "entities": [ + { + "text": "111000025", + "category": "PhoneNumber", + "offset": 18, + "length": 9, + "confidenceScore": 0.8 + }, + { + "text": "111000025", + "category": "ABARoutingNumber", + "offset": 18, + "length": 9, + "confidenceScore": 0.75 + }, + { + "text": "111000025", + "category": "NZSocialWelfareNumber", + "offset": 18, + "length": 9, + "confidenceScore": 0.65 + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-01-15" + } + }, + { + "lastUpdateDateTime": "2021-10-20T15:07:43.326227Z", + "taskName": "RecognizePiiEntities", + "state": "succeeded", + "results": { + "documents": [ + { + "redactedText": "A ********* with SSN *********** whose phone number is ************ is building tools with our APIs. They work at *********", + "id": "1", + "entities": [ + { + "text": "developer", + "category": "PersonType", + "offset": 2, + "length": 9, + "confidenceScore": 0.97 + }, + { + "text": "859-98-0987", + "category": "USSocialSecurityNumber", + "offset": 21, + "length": 11, + "confidenceScore": 0.65 + }, + { + "text": "800-102-1100", + "category": "PhoneNumber", + "offset": 55, + "length": 12, + "confidenceScore": 0.8 + }, + { + "text": "Microsoft", + "category": "Organization", + "offset": 114, + "length": 9, + "confidenceScore": 0.96 + } + ], + "warnings": [] + }, + { + "redactedText": "Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check", + "id": "2", + "entities": [ + { + "text": "111000025", + "category": "PhoneNumber", + "offset": 18, + "length": 9, + "confidenceScore": 0.8 + }, + { + "text": "111000025", + "category": "ABARoutingNumber", + "offset": 18, + "length": 9, + "confidenceScore": 0.75 + }, + { + "text": "111000025", + "category": "NZSocialWelfareNumber", + "offset": 18, + "length": 9, + "confidenceScore": 0.65 + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-01-15" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "1341045357", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticstestresources.cognitiveservices.azure.com/" + } +} \ No newline at end of file diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizePiiEntitiesTests/RecognizePiiEntitiesWithMultipleActionsAsync.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizePiiEntitiesTests/RecognizePiiEntitiesWithMultipleActionsAsync.json new file mode 100644 index 000000000000..d4d893d54df9 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/RecognizePiiEntitiesTests/RecognizePiiEntitiesWithMultipleActionsAsync.json @@ -0,0 +1,581 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Content-Length": "588", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-b6d98a42d2120c45bd0ca143c068d651-ace41864c72b1448-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "821d40e471b4a3a79e7730ad4fc1c667", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "1", + "text": "A developer with SSN 859-98-0987 whose phone number is 800-102-1100 is building tools with our APIs. They work at Microsoft", + "language": "en" + }, + { + "id": "2", + "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check", + "language": "en" + } + ] + }, + "tasks": { + "entityRecognitionPiiTasks": [ + { + "parameters": { + "loggingOptOut": true, + "stringIndexType": "Utf16CodeUnit" + }, + "taskName": "RecognizePiiEntitiesWithDisabledServiceLogs" + }, + { + "parameters": { + "stringIndexType": "Utf16CodeUnit" + }, + "taskName": "RecognizePiiEntities" + } + ] + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "7c1a3132-85b8-4387-9bd0-bb43c530a48f", + "Date": "Wed, 20 Oct 2021 15:07:44 GMT", + "operation-location": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/38ed5859-a47f-4cec-b6fe-e81ca169df19", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "352" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/38ed5859-a47f-4cec-b6fe-e81ca169df19", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "3419f09bc4750833caf320105774bf56", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "168a2352-05ce-4aec-8c20-05ce6a364f1e", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:44 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "9" + }, + "ResponseBody": { + "jobId": "38ed5859-a47f-4cec-b6fe-e81ca169df19", + "lastUpdateDateTime": "2021-10-20T15:07:45Z", + "createdDateTime": "2021-10-20T15:07:44Z", + "expirationDateTime": "2021-10-21T15:07:44Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/38ed5859-a47f-4cec-b6fe-e81ca169df19", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "ccb4ad560783f76c8e420bc524d6420d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "660d6e86-7ef1-4394-9426-0a0e947bbfc3", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:46 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "7" + }, + "ResponseBody": { + "jobId": "38ed5859-a47f-4cec-b6fe-e81ca169df19", + "lastUpdateDateTime": "2021-10-20T15:07:45Z", + "createdDateTime": "2021-10-20T15:07:44Z", + "expirationDateTime": "2021-10-21T15:07:44Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/38ed5859-a47f-4cec-b6fe-e81ca169df19", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "93b51ac3ab9a20fa0c15b7c151974c2a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "4d1ae5a5-ede2-49b0-bfd2-321d059fbf32", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:47 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "38ed5859-a47f-4cec-b6fe-e81ca169df19", + "lastUpdateDateTime": "2021-10-20T15:07:45Z", + "createdDateTime": "2021-10-20T15:07:44Z", + "expirationDateTime": "2021-10-21T15:07:44Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/38ed5859-a47f-4cec-b6fe-e81ca169df19", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "a157d9b8fa0d93e38321a533b96ee3f3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "8fa0af42-ea9f-4e15-a81a-6f7355a89a4e", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:48 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "38ed5859-a47f-4cec-b6fe-e81ca169df19", + "lastUpdateDateTime": "2021-10-20T15:07:45Z", + "createdDateTime": "2021-10-20T15:07:44Z", + "expirationDateTime": "2021-10-21T15:07:44Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/38ed5859-a47f-4cec-b6fe-e81ca169df19", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "3d4d12b02bbfabbbb294c06e50aba5f7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "6e641613-a773-4ff2-ba97-b7365ac0c9f7", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:49 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "19" + }, + "ResponseBody": { + "jobId": "38ed5859-a47f-4cec-b6fe-e81ca169df19", + "lastUpdateDateTime": "2021-10-20T15:07:45Z", + "createdDateTime": "2021-10-20T15:07:44Z", + "expirationDateTime": "2021-10-21T15:07:44Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/38ed5859-a47f-4cec-b6fe-e81ca169df19", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "4b0de0f6a17fc9003621107905c7669e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "578eade3-eeb0-4fc2-82c5-fbdb12a96376", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:50 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "10" + }, + "ResponseBody": { + "jobId": "38ed5859-a47f-4cec-b6fe-e81ca169df19", + "lastUpdateDateTime": "2021-10-20T15:07:45Z", + "createdDateTime": "2021-10-20T15:07:44Z", + "expirationDateTime": "2021-10-21T15:07:44Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/38ed5859-a47f-4cec-b6fe-e81ca169df19", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "3f11c3310e498c6a1dacef793a7543d8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "883ff7d6-d249-4d5d-885a-899c65a59bd3", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:52 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "114" + }, + "ResponseBody": { + "jobId": "38ed5859-a47f-4cec-b6fe-e81ca169df19", + "lastUpdateDateTime": "2021-10-20T15:07:52Z", + "createdDateTime": "2021-10-20T15:07:44Z", + "expirationDateTime": "2021-10-21T15:07:44Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "entityRecognitionPiiTasks": [ + { + "lastUpdateDateTime": "2021-10-20T15:07:52.4210588Z", + "taskName": "RecognizePiiEntitiesWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "redactedText": "A ********* with SSN *********** whose phone number is ************ is building tools with our APIs. They work at *********", + "id": "1", + "entities": [ + { + "text": "developer", + "category": "PersonType", + "offset": 2, + "length": 9, + "confidenceScore": 0.97 + }, + { + "text": "859-98-0987", + "category": "USSocialSecurityNumber", + "offset": 21, + "length": 11, + "confidenceScore": 0.65 + }, + { + "text": "800-102-1100", + "category": "PhoneNumber", + "offset": 55, + "length": 12, + "confidenceScore": 0.8 + }, + { + "text": "Microsoft", + "category": "Organization", + "offset": 114, + "length": 9, + "confidenceScore": 0.96 + } + ], + "warnings": [] + }, + { + "redactedText": "Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check", + "id": "2", + "entities": [ + { + "text": "111000025", + "category": "PhoneNumber", + "offset": 18, + "length": 9, + "confidenceScore": 0.8 + }, + { + "text": "111000025", + "category": "ABARoutingNumber", + "offset": 18, + "length": 9, + "confidenceScore": 0.75 + }, + { + "text": "111000025", + "category": "NZSocialWelfareNumber", + "offset": 18, + "length": 9, + "confidenceScore": 0.65 + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-01-15" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/38ed5859-a47f-4cec-b6fe-e81ca169df19", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "d83cad7b98600f741284069e1b42a5eb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "80d9972e-66de-44b0-b1d7-6508c686944e", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:07:53 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "284" + }, + "ResponseBody": { + "jobId": "38ed5859-a47f-4cec-b6fe-e81ca169df19", + "lastUpdateDateTime": "2021-10-20T15:07:53Z", + "createdDateTime": "2021-10-20T15:07:44Z", + "expirationDateTime": "2021-10-21T15:07:44Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 2, + "failed": 0, + "inProgress": 0, + "total": 2, + "entityRecognitionPiiTasks": [ + { + "lastUpdateDateTime": "2021-10-20T15:07:52.4210588Z", + "taskName": "RecognizePiiEntitiesWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "redactedText": "A ********* with SSN *********** whose phone number is ************ is building tools with our APIs. They work at *********", + "id": "1", + "entities": [ + { + "text": "developer", + "category": "PersonType", + "offset": 2, + "length": 9, + "confidenceScore": 0.97 + }, + { + "text": "859-98-0987", + "category": "USSocialSecurityNumber", + "offset": 21, + "length": 11, + "confidenceScore": 0.65 + }, + { + "text": "800-102-1100", + "category": "PhoneNumber", + "offset": 55, + "length": 12, + "confidenceScore": 0.8 + }, + { + "text": "Microsoft", + "category": "Organization", + "offset": 114, + "length": 9, + "confidenceScore": 0.96 + } + ], + "warnings": [] + }, + { + "redactedText": "Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check", + "id": "2", + "entities": [ + { + "text": "111000025", + "category": "PhoneNumber", + "offset": 18, + "length": 9, + "confidenceScore": 0.8 + }, + { + "text": "111000025", + "category": "ABARoutingNumber", + "offset": 18, + "length": 9, + "confidenceScore": 0.75 + }, + { + "text": "111000025", + "category": "NZSocialWelfareNumber", + "offset": 18, + "length": 9, + "confidenceScore": 0.65 + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-01-15" + } + }, + { + "lastUpdateDateTime": "2021-10-20T15:07:53.3406343Z", + "taskName": "RecognizePiiEntities", + "state": "succeeded", + "results": { + "documents": [ + { + "redactedText": "A ********* with SSN *********** whose phone number is ************ is building tools with our APIs. They work at *********", + "id": "1", + "entities": [ + { + "text": "developer", + "category": "PersonType", + "offset": 2, + "length": 9, + "confidenceScore": 0.97 + }, + { + "text": "859-98-0987", + "category": "USSocialSecurityNumber", + "offset": 21, + "length": 11, + "confidenceScore": 0.65 + }, + { + "text": "800-102-1100", + "category": "PhoneNumber", + "offset": 55, + "length": 12, + "confidenceScore": 0.8 + }, + { + "text": "Microsoft", + "category": "Organization", + "offset": 114, + "length": 9, + "confidenceScore": 0.96 + } + ], + "warnings": [] + }, + { + "redactedText": "Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check", + "id": "2", + "entities": [ + { + "text": "111000025", + "category": "PhoneNumber", + "offset": 18, + "length": 9, + "confidenceScore": 0.8 + }, + { + "text": "111000025", + "category": "ABARoutingNumber", + "offset": 18, + "length": 9, + "confidenceScore": 0.75 + }, + { + "text": "111000025", + "category": "NZSocialWelfareNumber", + "offset": 18, + "length": 9, + "confidenceScore": 0.65 + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2021-01-15" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "1062600152", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticstestresources.cognitiveservices.azure.com/" + } +} \ No newline at end of file diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/SingleCategoryClassifyTests/SingleCategoryClassifyWithMultipleActions.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/SingleCategoryClassifyTests/SingleCategoryClassifyWithMultipleActions.json new file mode 100644 index 000000000000..a709844e97d6 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/SingleCategoryClassifyTests/SingleCategoryClassifyWithMultipleActions.json @@ -0,0 +1,199 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Content-Length": "809", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-5e398ba1cf634245a2b1a430c7714403-319e4d1cfb55e844-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "b4a18820f5a60d810494d1c30b1a3ae3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "I need a reservation for an indoor restaurant in China. Please don\u0027t stop the music. Play music and add it to my playlist", + "language": "en" + }, + { + "id": "1", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + "language": "en" + } + ] + }, + "tasks": { + "customSingleClassificationTasks": [ + { + "parameters": { + "project-name": "659c1851-be0b-4142-b12a-087da9785926", + "deployment-name": "659c1851-be0b-4142-b12a-087da9785926", + "loggingOptOut": true + }, + "taskName": "SingleCategoryClassifyWithDisabledServiceLogs" + }, + { + "parameters": { + "project-name": "659c1851-be0b-4142-b12a-087da9785926", + "deployment-name": "659c1851-be0b-4142-b12a-087da9785926" + }, + "taskName": "SingleCategoryClassify" + } + ] + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "e9d36f7e-5271-4ddc-a855-da1921fb7c9d", + "Date": "Wed, 20 Oct 2021 15:08:33 GMT", + "operation-location": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/cfa9ef2c-31bd-46e5-bf99-620bb5b3962f", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "564" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/cfa9ef2c-31bd-46e5-bf99-620bb5b3962f", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "c750cb4ac189c7d6b678edfe3af1abca", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "3f77f977-98b7-49ae-bb36-51a5c5431ce6", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:08:33 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "47" + }, + "ResponseBody": { + "jobId": "cfa9ef2c-31bd-46e5-bf99-620bb5b3962f", + "lastUpdateDateTime": "2021-10-20T15:08:34Z", + "createdDateTime": "2021-10-20T15:08:34Z", + "expirationDateTime": "2021-10-21T15:08:34Z", + "status": "notStarted", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/cfa9ef2c-31bd-46e5-bf99-620bb5b3962f", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "0c298f97c150c3f51b910ea940f04e2f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "d59a060f-fd65-4a1d-89a0-17d301fee04b", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 20 Oct 2021 15:08:35 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "169" + }, + "ResponseBody": { + "jobId": "cfa9ef2c-31bd-46e5-bf99-620bb5b3962f", + "lastUpdateDateTime": "2021-10-20T15:08:35Z", + "createdDateTime": "2021-10-20T15:08:34Z", + "expirationDateTime": "2021-10-21T15:08:34Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 2, + "failed": 0, + "inProgress": 0, + "total": 2, + "customSingleClassificationTasks": [ + { + "lastUpdateDateTime": "2021-10-20T15:08:35.1829339Z", + "taskName": "SingleCategoryClassifyWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "classification": { + "category": "BookRestaurant", + "confidenceScore": 1.0 + }, + "warnings": [] + }, + { + "id": "1", + "classification": { + "category": "RateBook", + "confidenceScore": 0.57 + }, + "warnings": [] + } + ], + "errors": [], + "projectName": "659c1851-be0b-4142-b12a-087da9785926", + "deploymentName": "659c1851-be0b-4142-b12a-087da9785926" + } + }, + { + "lastUpdateDateTime": "2021-10-20T15:08:35.2502644Z", + "taskName": "SingleCategoryClassify", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "classification": { + "category": "BookRestaurant", + "confidenceScore": 1.0 + }, + "warnings": [] + }, + { + "id": "1", + "classification": { + "category": "RateBook", + "confidenceScore": 0.57 + }, + "warnings": [] + } + ], + "errors": [], + "projectName": "659c1851-be0b-4142-b12a-087da9785926", + "deploymentName": "659c1851-be0b-4142-b12a-087da9785926" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "546593598", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticstestresources.cognitiveservices.azure.com/" + } +} \ No newline at end of file diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/SingleCategoryClassifyTests/SingleCategoryClassifyWithMultipleActionsAsync.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/SingleCategoryClassifyTests/SingleCategoryClassifyWithMultipleActionsAsync.json new file mode 100644 index 000000000000..a47f48d74a8b --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/SingleCategoryClassifyTests/SingleCategoryClassifyWithMultipleActionsAsync.json @@ -0,0 +1,235 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Content-Length": "809", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-b85bce4b447289438391a843c7b103be-04f04d3698079a48-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "d3c6d7105a507aaa935f7f86576ac78b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "I need a reservation for an indoor restaurant in China. Please don\u0027t stop the music. Play music and add it to my playlist", + "language": "en" + }, + { + "id": "1", + "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component.", + "language": "en" + } + ] + }, + "tasks": { + "customSingleClassificationTasks": [ + { + "parameters": { + "project-name": "659c1851-be0b-4142-b12a-087da9785926", + "deployment-name": "659c1851-be0b-4142-b12a-087da9785926", + "loggingOptOut": true + }, + "taskName": "SingleCategoryClassifyWithDisabledServiceLogs" + }, + { + "parameters": { + "project-name": "659c1851-be0b-4142-b12a-087da9785926", + "deployment-name": "659c1851-be0b-4142-b12a-087da9785926" + }, + "taskName": "SingleCategoryClassify" + } + ] + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "654d41f5-79dc-4cbf-945c-8ff4d34dba0f", + "Date": "Thu, 21 Oct 2021 20:11:25 GMT", + "operation-location": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/feedf500-32c4-49db-9d8c-793009839a97", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "2221" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/feedf500-32c4-49db-9d8c-793009839a97", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "f8686274c74a089d6f13ee5d8a6ce13f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "622a4d01-e44e-4944-8f96-9cacb8777d49", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 21 Oct 2021 20:11:25 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "121" + }, + "ResponseBody": { + "jobId": "feedf500-32c4-49db-9d8c-793009839a97", + "lastUpdateDateTime": "2021-10-21T20:11:26Z", + "createdDateTime": "2021-10-21T20:11:25Z", + "expirationDateTime": "2021-10-22T20:11:25Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/feedf500-32c4-49db-9d8c-793009839a97", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "0ffa6c06102c270b0b15ff09eaf66f07", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "ea4121c6-b1b5-4076-befc-c8c8bd6cc175", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 21 Oct 2021 20:11:27 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "84" + }, + "ResponseBody": { + "jobId": "feedf500-32c4-49db-9d8c-793009839a97", + "lastUpdateDateTime": "2021-10-21T20:11:26Z", + "createdDateTime": "2021-10-21T20:11:25Z", + "expirationDateTime": "2021-10-22T20:11:25Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/feedf500-32c4-49db-9d8c-793009839a97", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211020.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "2125f74b40c949ac3abe633c6c4cf027", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "6424f362-27fc-46b3-bc04-e58e97325811", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 21 Oct 2021 20:11:28 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "302" + }, + "ResponseBody": { + "jobId": "feedf500-32c4-49db-9d8c-793009839a97", + "lastUpdateDateTime": "2021-10-21T20:11:29Z", + "createdDateTime": "2021-10-21T20:11:25Z", + "expirationDateTime": "2021-10-22T20:11:25Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 2, + "failed": 0, + "inProgress": 0, + "total": 2, + "customSingleClassificationTasks": [ + { + "lastUpdateDateTime": "2021-10-21T20:11:29.2937942Z", + "taskName": "SingleCategoryClassifyWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "classification": { + "category": "BookRestaurant", + "confidenceScore": 1.0 + }, + "warnings": [] + }, + { + "id": "1", + "classification": { + "category": "RateBook", + "confidenceScore": 0.57 + }, + "warnings": [] + } + ], + "errors": [], + "projectName": "659c1851-be0b-4142-b12a-087da9785926", + "deploymentName": "659c1851-be0b-4142-b12a-087da9785926" + } + }, + { + "lastUpdateDateTime": "2021-10-21T20:11:29.3283445Z", + "taskName": "SingleCategoryClassify", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "classification": { + "category": "BookRestaurant", + "confidenceScore": 1.0 + }, + "warnings": [] + }, + { + "id": "1", + "classification": { + "category": "RateBook", + "confidenceScore": 0.57 + }, + "warnings": [] + } + ], + "errors": [], + "projectName": "659c1851-be0b-4142-b12a-087da9785926", + "deploymentName": "659c1851-be0b-4142-b12a-087da9785926" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "1415508280", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticstestresources.cognitiveservices.azure.com/" + } +} \ No newline at end of file From dfdccd43b443bdf6957acc0e50073dda1b4a711b Mon Sep 17 00:00:00 2001 From: Salah Mostafa Date: Fri, 22 Oct 2021 00:32:48 +0200 Subject: [PATCH 10/16] Changed order in parameters --- .../src/AnalyzeSentimentActionResult.cs | 6 ++-- .../src/ExtractKeyPhrasesActionResult.cs | 6 ++-- .../src/ExtractSummaryActionResult.cs | 6 ++-- .../src/MultiCategoryClassifyActionResult.cs | 6 ++-- .../RecognizeCustomEntitiesActionResult.cs | 6 ++-- .../src/RecognizeEntitiesActionResult.cs | 6 ++-- .../RecognizeLinkedEntitiesActionResult.cs | 6 ++-- .../src/RecognizePiiEntitiesActionResult.cs | 6 ++-- .../src/SingleCategoryClassifyActionResult.cs | 6 ++-- .../src/TextAnalyticsActionResult.cs | 8 ++--- .../src/TextAnalyticsModelFactory.cs | 36 +++++++++---------- .../Azure.AI.TextAnalytics/src/Transforms.cs | 18 +++++----- 12 files changed, 58 insertions(+), 58 deletions(-) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeSentimentActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeSentimentActionResult.cs index d1f73cedbf39..b223669359f4 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeSentimentActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/AnalyzeSentimentActionResult.cs @@ -17,7 +17,7 @@ public class AnalyzeSentimentActionResult : TextAnalyticsActionResult /// Successful action. /// internal AnalyzeSentimentActionResult(AnalyzeSentimentResultCollection result, string actionName, DateTimeOffset completedOn) - : base(completedOn, actionName) + : base(actionName, completedOn) { _documentsResults = result; } @@ -25,8 +25,8 @@ internal AnalyzeSentimentActionResult(AnalyzeSentimentResultCollection result, s /// /// Action with an error. /// - internal AnalyzeSentimentActionResult(DateTimeOffset completedOn, string actionName, TextAnalyticsErrorInternal error) - : base(completedOn, actionName, error) { } + internal AnalyzeSentimentActionResult(string actionName, DateTimeOffset completedOn, TextAnalyticsErrorInternal error) + : base(actionName, completedOn, error) { } /// /// Gets the result of the execution of an per each input document. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractKeyPhrasesActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractKeyPhrasesActionResult.cs index 1c0bad5e9391..f353b5e0beff 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractKeyPhrasesActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractKeyPhrasesActionResult.cs @@ -17,7 +17,7 @@ public class ExtractKeyPhrasesActionResult : TextAnalyticsActionResult /// Successful action. /// internal ExtractKeyPhrasesActionResult(ExtractKeyPhrasesResultCollection result, string actionName, DateTimeOffset completedOn) - : base(completedOn, actionName) + : base(actionName, completedOn) { _documentsResults = result; } @@ -25,8 +25,8 @@ internal ExtractKeyPhrasesActionResult(ExtractKeyPhrasesResultCollection result, /// /// Action with an error. /// - internal ExtractKeyPhrasesActionResult(DateTimeOffset completedOn, string actionName, TextAnalyticsErrorInternal error) - : base(completedOn, actionName, error) { } + internal ExtractKeyPhrasesActionResult(string actionName, DateTimeOffset completedOn,TextAnalyticsErrorInternal error) + : base(actionName, completedOn, error) { } /// /// Gets the result of the execution of an per each input document. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractSummaryActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractSummaryActionResult.cs index 8d52dc56f066..ef70fe5a7c74 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractSummaryActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractSummaryActionResult.cs @@ -17,7 +17,7 @@ public class ExtractSummaryActionResult : TextAnalyticsActionResult /// Successful action. /// internal ExtractSummaryActionResult(ExtractSummaryResultCollection result, string actionName, DateTimeOffset completedOn) - : base(completedOn, actionName) + : base(actionName, completedOn) { _documentsResults = result; } @@ -25,8 +25,8 @@ internal ExtractSummaryActionResult(ExtractSummaryResultCollection result, strin /// /// Action with an error. /// - internal ExtractSummaryActionResult(DateTimeOffset completedOn, string actionName, TextAnalyticsErrorInternal error) - : base(completedOn, actionName, error) { } + internal ExtractSummaryActionResult(string actionName, DateTimeOffset completedOn,TextAnalyticsErrorInternal error) + : base(actionName, completedOn, error) { } /// /// Gets the result of the execution of an per each input document. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/MultiCategoryClassifyActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/MultiCategoryClassifyActionResult.cs index c44153e5ea87..a58ad9e917cd 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/MultiCategoryClassifyActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/MultiCategoryClassifyActionResult.cs @@ -17,7 +17,7 @@ public class MultiCategoryClassifyActionResult : TextAnalyticsActionResult /// Successful action. /// internal MultiCategoryClassifyActionResult(MultiCategoryClassifyResultCollection result, string actionName, DateTimeOffset completedOn) - : base(completedOn, actionName ) + : base(actionName, completedOn) { _documentsResults = result; } @@ -25,8 +25,8 @@ internal MultiCategoryClassifyActionResult(MultiCategoryClassifyResultCollection /// /// Action with an error. /// - internal MultiCategoryClassifyActionResult(DateTimeOffset completedOn, string actionName, TextAnalyticsErrorInternal error) - : base(completedOn, actionName, error) { } + internal MultiCategoryClassifyActionResult(string actionName, DateTimeOffset completedOn, TextAnalyticsErrorInternal error) + : base(actionName, completedOn, error) { } /// /// Gets the result of the execution of a per each input document. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeCustomEntitiesActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeCustomEntitiesActionResult.cs index d9c93f3491e5..b261d63f6d17 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeCustomEntitiesActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeCustomEntitiesActionResult.cs @@ -17,7 +17,7 @@ public class RecognizeCustomEntitiesActionResult : TextAnalyticsActionResult /// Successful action. /// internal RecognizeCustomEntitiesActionResult(RecognizeCustomEntitiesResultCollection result, string actionName, DateTimeOffset completedOn) - : base(completedOn, actionName) + : base(actionName, completedOn) { _documentsResults = result; } @@ -25,8 +25,8 @@ internal RecognizeCustomEntitiesActionResult(RecognizeCustomEntitiesResultCollec /// /// Action with an error. /// - internal RecognizeCustomEntitiesActionResult(DateTimeOffset completedOn, string actionName, TextAnalyticsErrorInternal error) - : base(completedOn, actionName, error) { } + internal RecognizeCustomEntitiesActionResult(string actionName, DateTimeOffset completedOn,TextAnalyticsErrorInternal error) + : base(actionName, completedOn, error) { } /// /// Gets the result of the execution of a per each input document. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeEntitiesActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeEntitiesActionResult.cs index 86393681e9d1..10cc341d79f4 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeEntitiesActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeEntitiesActionResult.cs @@ -17,7 +17,7 @@ public class RecognizeEntitiesActionResult : TextAnalyticsActionResult /// Successful action. /// internal RecognizeEntitiesActionResult(RecognizeEntitiesResultCollection result, string actionName, DateTimeOffset completedOn) - : base(completedOn, actionName) + : base(actionName, completedOn) { _documentsResults = result; } @@ -25,8 +25,8 @@ internal RecognizeEntitiesActionResult(RecognizeEntitiesResultCollection result, /// /// Action with an error. /// - internal RecognizeEntitiesActionResult(DateTimeOffset completedOn, string actionName, TextAnalyticsErrorInternal error) - : base(completedOn, actionName, error) { } + internal RecognizeEntitiesActionResult(string actionName, DateTimeOffset completedOn, TextAnalyticsErrorInternal error) + : base(actionName, completedOn, error) { } /// /// Gets the result of the execution of a per each input document. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeLinkedEntitiesActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeLinkedEntitiesActionResult.cs index 3a7521198db5..a2cce657bfa1 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeLinkedEntitiesActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizeLinkedEntitiesActionResult.cs @@ -17,7 +17,7 @@ public class RecognizeLinkedEntitiesActionResult : TextAnalyticsActionResult /// Successful action. /// internal RecognizeLinkedEntitiesActionResult(RecognizeLinkedEntitiesResultCollection result, string actionName, DateTimeOffset completedOn) - : base(completedOn, actionName) + : base(actionName, completedOn) { _documentsResults = result; } @@ -25,8 +25,8 @@ internal RecognizeLinkedEntitiesActionResult(RecognizeLinkedEntitiesResultCollec /// /// Action with an error. /// - internal RecognizeLinkedEntitiesActionResult(DateTimeOffset completedOn, string actionName, TextAnalyticsErrorInternal error) - : base(completedOn, actionName, error) { } + internal RecognizeLinkedEntitiesActionResult(string actionName, DateTimeOffset completedOn,TextAnalyticsErrorInternal error) + : base(actionName, completedOn, error) { } /// /// Gets the result of the execution of a per each input document. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizePiiEntitiesActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizePiiEntitiesActionResult.cs index 57fd1689fd81..34c6439ef7f5 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizePiiEntitiesActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/RecognizePiiEntitiesActionResult.cs @@ -17,7 +17,7 @@ public class RecognizePiiEntitiesActionResult : TextAnalyticsActionResult /// Successful action. /// internal RecognizePiiEntitiesActionResult(RecognizePiiEntitiesResultCollection result, string actionName, DateTimeOffset completedOn) - : base(completedOn, actionName) + : base(actionName, completedOn) { _documentsResults = result; } @@ -25,8 +25,8 @@ internal RecognizePiiEntitiesActionResult(RecognizePiiEntitiesResultCollection r /// /// Action with an error. /// - internal RecognizePiiEntitiesActionResult(DateTimeOffset completedOn, string actionName, TextAnalyticsErrorInternal error) - : base(completedOn, actionName, error) { } + internal RecognizePiiEntitiesActionResult(string actionName, DateTimeOffset completedOn, TextAnalyticsErrorInternal error) + : base(actionName, completedOn, error) { } /// /// Gets the result of the execution of a per each input document. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/SingleCategoryClassifyActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/SingleCategoryClassifyActionResult.cs index 7f5dc933b643..e3893451993e 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/SingleCategoryClassifyActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/SingleCategoryClassifyActionResult.cs @@ -17,7 +17,7 @@ public class SingleCategoryClassifyActionResult : TextAnalyticsActionResult /// Successful action. /// internal SingleCategoryClassifyActionResult(SingleCategoryClassifyResultCollection result, string actionName, DateTimeOffset completedOn) - : base(completedOn, actionName) + : base(actionName, completedOn) { _documentsResults = result; } @@ -25,8 +25,8 @@ internal SingleCategoryClassifyActionResult(SingleCategoryClassifyResultCollecti /// /// Action with an error. /// - internal SingleCategoryClassifyActionResult(DateTimeOffset completedOn, string actionName, TextAnalyticsErrorInternal error) - : base(completedOn, actionName, error) { } + internal SingleCategoryClassifyActionResult(string actionName, DateTimeOffset completedOn,TextAnalyticsErrorInternal error) + : base(actionName, completedOn, error) { } /// /// Gets the result of the execution of a per each input document. diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActionResult.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActionResult.cs index 754ee3fe6790..7efa511d6611 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActionResult.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsActionResult.cs @@ -11,17 +11,17 @@ namespace Azure.AI.TextAnalytics /// public class TextAnalyticsActionResult { - internal TextAnalyticsActionResult (DateTimeOffset completedOn, string actionName, TextAnalyticsErrorInternal error) + internal TextAnalyticsActionResult(string actionName, DateTimeOffset completedOn, TextAnalyticsErrorInternal error) { - CompletedOn = completedOn; ActionName = actionName; + CompletedOn = completedOn; Error = error != null ? Transforms.ConvertToError(error) : default; } - internal TextAnalyticsActionResult(DateTimeOffset completedOn, string actionName) + internal TextAnalyticsActionResult(string actionName, DateTimeOffset completedOn) { - CompletedOn = completedOn; ActionName = actionName; + CompletedOn = completedOn; } /// diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs index 4fb6a40392aa..bca21ef0586c 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/TextAnalyticsModelFactory.cs @@ -861,7 +861,7 @@ public static ExtractKeyPhrasesActionResult ExtractKeyPhrasesActionResult( string code, string message) { - return new ExtractKeyPhrasesActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); + return new ExtractKeyPhrasesActionResult(actionName, completedOn, new TextAnalyticsErrorInternal(code, message)); } /// @@ -877,7 +877,7 @@ public static ExtractKeyPhrasesActionResult ExtractKeyPhrasesActionResult( string code, string message) { - return new ExtractKeyPhrasesActionResult(completedOn, default, new TextAnalyticsErrorInternal(code, message)); + return new ExtractKeyPhrasesActionResult(default, completedOn, new TextAnalyticsErrorInternal(code, message)); } /// @@ -923,7 +923,7 @@ public static ExtractSummaryActionResult ExtractSummaryActionResult( string code, string message) { - return new ExtractSummaryActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); + return new ExtractSummaryActionResult(actionName, completedOn, new TextAnalyticsErrorInternal(code, message)); } /// @@ -939,7 +939,7 @@ public static ExtractSummaryActionResult ExtractSummaryActionResult( string code, string message) { - return new ExtractSummaryActionResult(completedOn, default, new TextAnalyticsErrorInternal(code, message)); + return new ExtractSummaryActionResult(default, completedOn, new TextAnalyticsErrorInternal(code, message)); } /// @@ -985,7 +985,7 @@ public static RecognizeCustomEntitiesActionResult RecognizeCustomEntitiesActionR string code, string message) { - return new RecognizeCustomEntitiesActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); + return new RecognizeCustomEntitiesActionResult(actionName, completedOn, new TextAnalyticsErrorInternal(code, message)); } /// @@ -1001,7 +1001,7 @@ public static RecognizeCustomEntitiesActionResult RecognizeCustomEntitiesActionR string code, string message) { - return new RecognizeCustomEntitiesActionResult(completedOn, default, new TextAnalyticsErrorInternal(code, message)); + return new RecognizeCustomEntitiesActionResult(default, completedOn, new TextAnalyticsErrorInternal(code, message)); } /// @@ -1047,7 +1047,7 @@ public static MultiCategoryClassifyActionResult MultiCategoryClassifyActionResul string code, string message) { - return new MultiCategoryClassifyActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); + return new MultiCategoryClassifyActionResult(actionName, completedOn, new TextAnalyticsErrorInternal(code, message)); } /// @@ -1063,7 +1063,7 @@ public static MultiCategoryClassifyActionResult MultiCategoryClassifyActionResul string code, string message) { - return new MultiCategoryClassifyActionResult(completedOn, default, new TextAnalyticsErrorInternal(code, message)); + return new MultiCategoryClassifyActionResult(default, completedOn, new TextAnalyticsErrorInternal(code, message)); } /// @@ -1109,7 +1109,7 @@ public static SingleCategoryClassifyActionResult SingleCategoryClassifyActionRes string code, string message) { - return new SingleCategoryClassifyActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); + return new SingleCategoryClassifyActionResult(actionName, completedOn, new TextAnalyticsErrorInternal(code, message)); } /// @@ -1125,7 +1125,7 @@ public static SingleCategoryClassifyActionResult SingleCategoryClassifyActionRes string code, string message) { - return new SingleCategoryClassifyActionResult(completedOn, default, new TextAnalyticsErrorInternal(code, message)); + return new SingleCategoryClassifyActionResult(default, completedOn, new TextAnalyticsErrorInternal(code, message)); } /// @@ -1172,7 +1172,7 @@ public static AnalyzeSentimentActionResult AnalyzeSentimentActionResult( string code, string message) { - return new AnalyzeSentimentActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); + return new AnalyzeSentimentActionResult(actionName, completedOn, new TextAnalyticsErrorInternal(code, message)); } /// @@ -1188,7 +1188,7 @@ public static AnalyzeSentimentActionResult AnalyzeSentimentActionResult( string code, string message) { - return new AnalyzeSentimentActionResult(completedOn, default, new TextAnalyticsErrorInternal(code, message)); + return new AnalyzeSentimentActionResult(default, completedOn, new TextAnalyticsErrorInternal(code, message)); } /// @@ -1234,7 +1234,7 @@ public static RecognizeLinkedEntitiesActionResult RecognizeLinkedEntitiesActionR string code, string message) { - return new RecognizeLinkedEntitiesActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); + return new RecognizeLinkedEntitiesActionResult(actionName, completedOn, new TextAnalyticsErrorInternal(code, message)); } /// @@ -1250,7 +1250,7 @@ public static RecognizeLinkedEntitiesActionResult RecognizeLinkedEntitiesActionR string code, string message) { - return new RecognizeLinkedEntitiesActionResult(completedOn, default, new TextAnalyticsErrorInternal(code, message)); + return new RecognizeLinkedEntitiesActionResult(default, completedOn, new TextAnalyticsErrorInternal(code, message)); } /// @@ -1296,7 +1296,7 @@ public static RecognizeEntitiesActionResult RecognizeEntitiesActionResult( string code, string message) { - return new RecognizeEntitiesActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); + return new RecognizeEntitiesActionResult(actionName, completedOn, new TextAnalyticsErrorInternal(code, message)); } /// @@ -1312,7 +1312,7 @@ public static RecognizeEntitiesActionResult RecognizeEntitiesActionResult( string code, string message) { - return new RecognizeEntitiesActionResult(completedOn, default, new TextAnalyticsErrorInternal(code, message)); + return new RecognizeEntitiesActionResult(default, completedOn, new TextAnalyticsErrorInternal(code, message)); } /// ` @@ -1358,7 +1358,7 @@ public static RecognizePiiEntitiesActionResult RecognizePiiEntitiesActionResult( string code, string message) { - return new RecognizePiiEntitiesActionResult(completedOn, actionName, new TextAnalyticsErrorInternal(code, message)); + return new RecognizePiiEntitiesActionResult(actionName, completedOn, new TextAnalyticsErrorInternal(code, message)); } /// @@ -1374,7 +1374,7 @@ public static RecognizePiiEntitiesActionResult RecognizePiiEntitiesActionResult( string code, string message) { - return new RecognizePiiEntitiesActionResult(completedOn, default, new TextAnalyticsErrorInternal(code, message)); + return new RecognizePiiEntitiesActionResult(default, completedOn, new TextAnalyticsErrorInternal(code, message)); } #endregion Action Result Models diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs index f26eed43714d..5abb82d93d75 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/Transforms.cs @@ -777,7 +777,7 @@ private static IReadOnlyCollection ConvertToM if (taskError != null) { - collection.Add(new MultiCategoryClassifyActionResult(task.LastUpdateDateTime, task.TaskName, taskError)); + collection.Add(new MultiCategoryClassifyActionResult(task.TaskName, task.LastUpdateDateTime, taskError)); } else { @@ -799,7 +799,7 @@ private static IReadOnlyCollection ConvertTo if (taskError != null) { - collection.Add(new SingleCategoryClassifyActionResult(task.LastUpdateDateTime, task.TaskName, taskError)); + collection.Add(new SingleCategoryClassifyActionResult(task.TaskName, task.LastUpdateDateTime, taskError)); } else { @@ -821,7 +821,7 @@ private static IReadOnlyCollection ConvertToAnalyz if (taskError != null) { - collection.Add(new AnalyzeSentimentActionResult(task.LastUpdateDateTime, task.TaskName, taskError)); + collection.Add(new AnalyzeSentimentActionResult( task.TaskName,task.LastUpdateDateTime, taskError)); } else { @@ -843,7 +843,7 @@ private static IReadOnlyCollection ConvertT if (taskError != null) { - collection.Add(new RecognizeLinkedEntitiesActionResult(task.LastUpdateDateTime, task.TaskName, taskError)); + collection.Add(new RecognizeLinkedEntitiesActionResult(task.TaskName, task.LastUpdateDateTime, taskError)); } else { @@ -865,7 +865,7 @@ private static IReadOnlyCollection ConvertToExtra if (taskError != null) { - collection.Add(new ExtractKeyPhrasesActionResult(task.LastUpdateDateTime, task.TaskName, taskError)); + collection.Add(new ExtractKeyPhrasesActionResult(task.TaskName, task.LastUpdateDateTime, taskError)); } else { @@ -887,7 +887,7 @@ private static IReadOnlyCollection ConvertToRe if (taskError != null) { - collection.Add(new RecognizePiiEntitiesActionResult(task.LastUpdateDateTime, task.TaskName, taskError)); + collection.Add(new RecognizePiiEntitiesActionResult(task.TaskName, task.LastUpdateDateTime, taskError)); } else { @@ -909,7 +909,7 @@ private static IReadOnlyCollection ConvertToRecog if (taskError != null) { - collection.Add(new RecognizeEntitiesActionResult(task.LastUpdateDateTime, task.TaskName, taskError)); + collection.Add(new RecognizeEntitiesActionResult(task.TaskName, task.LastUpdateDateTime, taskError)); } else { @@ -931,7 +931,7 @@ private static IReadOnlyCollection ConvertT if (taskError != null) { - collection.Add(new RecognizeCustomEntitiesActionResult(task.LastUpdateDateTime, task.TaskName, taskError)); + collection.Add(new RecognizeCustomEntitiesActionResult(task.TaskName, task.LastUpdateDateTime, taskError)); } else { @@ -953,7 +953,7 @@ private static IReadOnlyCollection ConvertToExtractS if (taskError != null) { - collection.Add(new ExtractSummaryActionResult(task.LastUpdateDateTime, task.TaskName, taskError)); + collection.Add(new ExtractSummaryActionResult(task.TaskName, task.LastUpdateDateTime, taskError)); } else { From 29badfe23aeda64fd83cbd50227cf0963183a2a6 Mon Sep 17 00:00:00 2001 From: Salah Mostafa Date: Fri, 22 Oct 2021 01:49:43 +0200 Subject: [PATCH 11/16] Modified AnalyzeOperationWithMultipleActionsOfSameType test --- .../tests/AnalyzeOperationTests.cs | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs index bc448968b663..5e305cb6bd6c 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs @@ -301,6 +301,124 @@ public async Task AnalyzeOperationWithMultipleActions() Assert.AreEqual(TextSentiment.Neutral, analyzeSentimentDocumentsResults[1].DocumentSentiment.Sentiment); } + [RecordedTest] + public async Task AnalyzeOperationWithMultipleActionsOfSameType() + { + TextAnalyticsClient client = GetClient(); + + var batchDocuments = new List + { + new TextDocumentInput("1", "Microsoft was founded by Bill Gates and Paul Allen.") + { + Language = "en", + }, + new TextDocumentInput("2", "Mi perro y mi gato tienen que ir al veterinario.") + { + Language = "es", + } + }; + + TextAnalyticsActions batchActions = new TextAnalyticsActions() + { + ExtractKeyPhrasesActions = new List() + { + new ExtractKeyPhrasesAction() + { ActionName = "DisableServaiceLogsTrue", DisableServiceLogs = true }, + new ExtractKeyPhrasesAction() + { ActionName = "DisableServiceLogsFalse"}, + }, + RecognizeEntitiesActions = new List() + { + new RecognizeEntitiesAction() + { ActionName = "DisableServiceLogsTrue", DisableServiceLogs = true }, + new RecognizeEntitiesAction() + { ActionName = "DisableServiceLogsFalse" }, + }, + RecognizePiiEntitiesActions = new List() + { + new RecognizePiiEntitiesAction() + { ActionName = "DisableServiceLogsTrue", DisableServiceLogs = true }, + new RecognizePiiEntitiesAction() + { ActionName = "DisableServiceLogsFalse" }, + }, + RecognizeLinkedEntitiesActions = new List() + { + new RecognizeLinkedEntitiesAction() + { ActionName = "DisableServiceLogsTrue", DisableServiceLogs = true }, + new RecognizeLinkedEntitiesAction() + { ActionName = "DisableServiceLogsFalse" }, + }, + AnalyzeSentimentActions = new List() + { + new AnalyzeSentimentAction() + { ActionName = "DisableServiceLogsTrue", DisableServiceLogs = true }, + new AnalyzeSentimentAction() + { ActionName = "DisableServiceLogsFalse" }, + }, + RecognizeCustomEntitiesActions = new List() + { + new RecognizeCustomEntitiesAction(TestEnvironment.RecognizeCustomEntitiesProjectName, TestEnvironment.RecognizeCustomEntitiesDeploymentName) + { ActionName = "DisableServiceLogsTrue", DisableServiceLogs = true }, + new RecognizeCustomEntitiesAction(TestEnvironment.RecognizeCustomEntitiesProjectName, TestEnvironment.RecognizeCustomEntitiesDeploymentName) + { ActionName = "DisableServiceLogsFalse" }, + }, + SingleCategoryClassifyActions = new List() + { + new SingleCategoryClassifyAction(TestEnvironment.SingleClassificationProjectName, TestEnvironment.SingleClassificationDeploymentName) + { ActionName = "DisableServiceLogsTrue", DisableServiceLogs = true }, + new SingleCategoryClassifyAction(TestEnvironment.SingleClassificationProjectName, TestEnvironment.SingleClassificationDeploymentName) + { ActionName = "DisableServiceLogsFalse" }, + }, + MultiCategoryClassifyActions = new List() + { + new MultiCategoryClassifyAction(TestEnvironment.MultiClassificationProjectName, TestEnvironment.MultiClassificationDeploymentName) + { ActionName = "DisableServiceLogsTrue", DisableServiceLogs = true }, + new MultiCategoryClassifyAction(TestEnvironment.MultiClassificationProjectName, TestEnvironment.MultiClassificationDeploymentName) + { ActionName = "DisableServiceLogsFalse"}, + }, + DisplayName = "AnalyzeOperationWithMultipleTasksOfSameType" + }; + + AnalyzeActionsOperation operation = await client.StartAnalyzeActionsAsync(batchDocuments, batchActions); + + Assert.AreEqual(0, operation.ActionsFailed); + Assert.AreEqual(0, operation.ActionsSucceeded); + Assert.AreEqual(0, operation.ActionsInProgress); + Assert.AreEqual(0, operation.ActionsTotal); + + await operation.WaitForCompletionAsync(); + + Assert.AreEqual(0, operation.ActionsFailed); + Assert.AreEqual(16, operation.ActionsSucceeded); + Assert.AreEqual(0, operation.ActionsInProgress); + Assert.AreEqual(16, operation.ActionsTotal); + Assert.AreNotEqual(new DateTimeOffset(), operation.CreatedOn); + Assert.AreNotEqual(new DateTimeOffset(), operation.LastModified); + Assert.AreNotEqual(new DateTimeOffset(), operation.ExpiresOn); + + //Take the first page + AnalyzeActionsResult resultCollection = operation.Value.ToEnumerableAsync().Result.FirstOrDefault(); + + IReadOnlyCollection entitiesActionsResults = resultCollection.RecognizeEntitiesResults; + IReadOnlyCollection keyPhrasesActionsResults = resultCollection.ExtractKeyPhrasesResults; + IReadOnlyCollection piiActionsResults = resultCollection.RecognizePiiEntitiesResults; + IReadOnlyCollection entityLinkingActionsResults = resultCollection.RecognizeLinkedEntitiesResults; + IReadOnlyCollection analyzeSentimentActionsResults = resultCollection.AnalyzeSentimentResults; + IReadOnlyCollection recognizeCustomEntitiesResults = resultCollection.RecognizeCustomEntitiesResults; + IReadOnlyCollection singleCategoryClassifyResults = resultCollection.SingleCategoryClassifyResults; + IReadOnlyCollection multiCategoryClassifyResults = resultCollection.MultiCategoryClassifyResults; + + Assert.IsNotNull(keyPhrasesActionsResults); + Assert.IsNotNull(entitiesActionsResults); + Assert.IsNotNull(piiActionsResults); + Assert.IsNotNull(entityLinkingActionsResults); + Assert.IsNotNull(analyzeSentimentActionsResults); + Assert.IsNotNull(recognizeCustomEntitiesResults); + Assert.IsNotNull(singleCategoryClassifyResults); + Assert.IsNotNull(multiCategoryClassifyResults); + Assert.AreEqual("AnalyzeOperationWithMultipleTasks", operation.DisplayName); + } + [RecordedTest] public async Task AnalyzeOperationWithPagination() { From e5df78e661b625fa60d67bda79758c46d0c36be3 Mon Sep 17 00:00:00 2001 From: Salah Mostafa Date: Fri, 22 Oct 2021 02:41:50 +0200 Subject: [PATCH 12/16] Changed new tests asserting --- .../Azure.AI.TextAnalytics/tests/AnalyzeSentimentTests.cs | 5 ++--- .../Azure.AI.TextAnalytics/tests/ExtractKeyPhrasesTests.cs | 5 ++--- .../Azure.AI.TextAnalytics/tests/ExtractSummaryTests.cs | 5 ++--- .../tests/MultiCategoryClassifyTests.cs | 5 ++--- .../tests/RecognizeCustomEntitiesTests.cs | 5 ++--- .../Azure.AI.TextAnalytics/tests/RecognizeEntitiesTests.cs | 5 ++--- .../tests/RecognizeLinkedEntitiesTests.cs | 5 ++--- .../tests/RecognizePiiEntitiesTests.cs | 5 ++--- .../tests/SingleCategoryClassifyTests.cs | 5 ++--- 9 files changed, 18 insertions(+), 27 deletions(-) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeSentimentTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeSentimentTests.cs index dee33c14dd23..0af27ea033dc 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeSentimentTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeSentimentTests.cs @@ -465,10 +465,9 @@ public async Task AnalyzeSentimentWithMultipleActions() IReadOnlyCollection AnalyzeSentimentActionsResults = resultCollection.AnalyzeSentimentResults; Assert.IsNotNull(AnalyzeSentimentActionsResults); - Assert.AreEqual(2, AnalyzeSentimentActionsResults.Count); - Assert.AreEqual("AnalyzeSentimentWithDisabledServiceLogs", AnalyzeSentimentActionsResults.ElementAt(0).ActionName); - Assert.AreEqual("AnalyzeSentiment", AnalyzeSentimentActionsResults.ElementAt(1).ActionName); + IList expected = new List { "AnalyzeSentiment", "AnalyzeSentimentWithDisabledServiceLogs" }; + CollectionAssert.AreEquivalent(expected, AnalyzeSentimentActionsResults.Select(result => result.ActionName)); } private void CheckAnalyzeSentimentProperties(DocumentSentiment doc, bool opinionMining = false) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/ExtractKeyPhrasesTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/ExtractKeyPhrasesTests.cs index 96c33ccb9a79..c77130e808f5 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/ExtractKeyPhrasesTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/ExtractKeyPhrasesTests.cs @@ -228,10 +228,9 @@ public async Task ExtractKeyPhrasesWithMultipleActions() IReadOnlyCollection ExtractKeyPhrasesActionsResults = resultCollection.ExtractKeyPhrasesResults; Assert.IsNotNull(ExtractKeyPhrasesActionsResults); - Assert.AreEqual(2, ExtractKeyPhrasesActionsResults.Count); - Assert.AreEqual("ExtractKeyPhrasesWithDisabledServiceLogs", ExtractKeyPhrasesActionsResults.ElementAt(0).ActionName); - Assert.AreEqual("ExtractKeyPhrases", ExtractKeyPhrasesActionsResults.ElementAt(1).ActionName); + IList expected = new List { "ExtractKeyPhrases", "ExtractKeyPhrasesWithDisabledServiceLogs" }; + CollectionAssert.AreEquivalent(expected, ExtractKeyPhrasesActionsResults.Select(result => result.ActionName)); } private void ValidateInDocumenResult(KeyPhraseCollection keyPhrases, int minKeyPhrasesCount = default) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/ExtractSummaryTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/ExtractSummaryTests.cs index efff0f683bf9..c0a2d3f158bd 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/ExtractSummaryTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/ExtractSummaryTests.cs @@ -306,10 +306,9 @@ public async Task ExtractSummaryWithMultipleActions() IReadOnlyCollection ExtractSummaryActionsResults = resultCollection.ExtractSummaryResults; Assert.IsNotNull(ExtractSummaryActionsResults); - Assert.AreEqual(2, ExtractSummaryActionsResults.Count); - Assert.AreEqual("ExtractSummaryWithDisabledServiceLogs", ExtractSummaryActionsResults.ElementAt(0).ActionName); - Assert.AreEqual("ExtractSummary", ExtractSummaryActionsResults.ElementAt(1).ActionName); + IList expected = new List { "ExtractSummary", "ExtractSummaryWithDisabledServiceLogs" }; + CollectionAssert.AreEquivalent(expected, ExtractSummaryActionsResults.Select(result => result.ActionName)); } private void ValidateSummaryDocumentResult(SummarySentenceCollection sentences, SummarySentencesOrder expectedOrder) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/MultiCategoryClassifyTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/MultiCategoryClassifyTests.cs index 66d4d42f8185..cd91dcf0ec52 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/MultiCategoryClassifyTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/MultiCategoryClassifyTests.cs @@ -243,10 +243,9 @@ public async Task MultiCategoryClassifyWithMultipleActions() IReadOnlyCollection multiCategoryClassifyActionsResults = resultCollection.MultiCategoryClassifyResults; Assert.IsNotNull(multiCategoryClassifyActionsResults); - Assert.AreEqual(2, multiCategoryClassifyActionsResults.Count); - Assert.AreEqual("MultiCategoryClassifyWithDisabledServiceLogs", multiCategoryClassifyActionsResults.ElementAt(0).ActionName); - Assert.AreEqual("MultiCategoryClassify", multiCategoryClassifyActionsResults.ElementAt(1).ActionName); + IList expected = new List { "MultiCategoryClassify", "MultiCategoryClassifyWithDisabledServiceLogs" }; + CollectionAssert.AreEquivalent(expected, multiCategoryClassifyActionsResults.Select(result => result.ActionName)); } private void ValidateSummaryDocumentResult(ClassificationCategoryCollection classificationCollection) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeCustomEntitiesTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeCustomEntitiesTests.cs index 062ddb12f588..6643c58fc2d5 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeCustomEntitiesTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeCustomEntitiesTests.cs @@ -274,10 +274,9 @@ public async Task RecognizeCustomEntitiesWithMultipleActions() IReadOnlyCollection RecognizeCustomEntitiesActionsResults = resultCollection.RecognizeCustomEntitiesResults; Assert.IsNotNull(RecognizeCustomEntitiesActionsResults); - Assert.AreEqual(2, RecognizeCustomEntitiesActionsResults.Count); - Assert.AreEqual("RecognizeCustomEntitiesWithDisabledServiceLogs", RecognizeCustomEntitiesActionsResults.ElementAt(0).ActionName); - Assert.AreEqual("RecognizeCustomEntities", RecognizeCustomEntitiesActionsResults.ElementAt(1).ActionName); + IList expected = new List { "RecognizeCustomEntities", "RecognizeCustomEntitiesWithDisabledServiceLogs" }; + CollectionAssert.AreEquivalent(expected, RecognizeCustomEntitiesActionsResults.Select(result => result.ActionName)); } private RecognizeCustomEntitiesResultCollection ExtractDocumentsResultsFromResponse(AnalyzeActionsOperation analyzeActionOperation) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeEntitiesTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeEntitiesTests.cs index 13e7f0d654af..b54fd4331ed3 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeEntitiesTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeEntitiesTests.cs @@ -270,10 +270,9 @@ public async Task RecognizeEntitiesWithMultipleActions() IReadOnlyCollection RecognizeEntitiesActionsResults = resultCollection.RecognizeEntitiesResults; Assert.IsNotNull(RecognizeEntitiesActionsResults); - Assert.AreEqual(2, RecognizeEntitiesActionsResults.Count); - Assert.AreEqual("RecognizeEntitiesWithDisabledServiceLogs", RecognizeEntitiesActionsResults.ElementAt(0).ActionName); - Assert.AreEqual("RecognizeEntities", RecognizeEntitiesActionsResults.ElementAt(1).ActionName); + IList expected = new List { "RecognizeEntities", "RecognizeEntitiesWithDisabledServiceLogs" }; + CollectionAssert.AreEquivalent(expected, RecognizeEntitiesActionsResults.Select(result => result.ActionName)); } private void ValidateInDocumenResult(CategorizedEntityCollection entities, List minimumExpectedOutput) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeLinkedEntitiesTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeLinkedEntitiesTests.cs index 97dafc752bb7..1ef8ac03ba38 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeLinkedEntitiesTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizeLinkedEntitiesTests.cs @@ -246,10 +246,9 @@ public async Task RecognizeLinkedEntitiesWithMultipleActions() IReadOnlyCollection RecognizeLinkedEntitiesActionsResults = resultCollection.RecognizeLinkedEntitiesResults; Assert.IsNotNull(RecognizeLinkedEntitiesActionsResults); - Assert.AreEqual(2, RecognizeLinkedEntitiesActionsResults.Count); - Assert.AreEqual("RecognizeLinkedEntitiesWithDisabledServiceLogs", RecognizeLinkedEntitiesActionsResults.ElementAt(0).ActionName); - Assert.AreEqual("RecognizeLinkedEntities", RecognizeLinkedEntitiesActionsResults.ElementAt(1).ActionName); + IList expected = new List { "RecognizeLinkedEntities", "RecognizeLinkedEntitiesWithDisabledServiceLogs" }; + CollectionAssert.AreEquivalent(expected, RecognizeLinkedEntitiesActionsResults.Select(result => result.ActionName)); } private void ValidateInDocumenResult(LinkedEntityCollection entities, List minimumExpectedOutput) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizePiiEntitiesTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizePiiEntitiesTests.cs index 02bbacc8bb66..7622fe5c2bc9 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizePiiEntitiesTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/RecognizePiiEntitiesTests.cs @@ -268,10 +268,9 @@ public async Task RecognizePiiEntitiesWithMultipleActions() IReadOnlyCollection RecognizePiiEntitiesActionsResults = resultCollection.RecognizePiiEntitiesResults; Assert.IsNotNull(RecognizePiiEntitiesActionsResults); - Assert.AreEqual(2, RecognizePiiEntitiesActionsResults.Count); - Assert.AreEqual("RecognizePiiEntitiesWithDisabledServiceLogs", RecognizePiiEntitiesActionsResults.ElementAt(0).ActionName); - Assert.AreEqual("RecognizePiiEntities", RecognizePiiEntitiesActionsResults.ElementAt(1).ActionName); + IList expected = new List { "RecognizePiiEntities", "RecognizePiiEntitiesWithDisabledServiceLogs" }; + CollectionAssert.AreEquivalent(expected, RecognizePiiEntitiesActionsResults.Select(result => result.ActionName)); } private void ValidateInDocumenResult(PiiEntityCollection entities, List minimumExpectedOutput) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SingleCategoryClassifyTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SingleCategoryClassifyTests.cs index af6957e247ae..39b4eedbd930 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SingleCategoryClassifyTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SingleCategoryClassifyTests.cs @@ -242,10 +242,9 @@ public async Task SingleCategoryClassifyWithMultipleActions() IReadOnlyCollection singleCategoryClassifyActionsResults = resultCollection.SingleCategoryClassifyResults; Assert.IsNotNull(singleCategoryClassifyActionsResults); - Assert.AreEqual(2, singleCategoryClassifyActionsResults.Count); - Assert.AreEqual("SingleCategoryClassifyWithDisabledServiceLogs", singleCategoryClassifyActionsResults.ElementAt(0).ActionName); - Assert.AreEqual("SingleCategoryClassify", singleCategoryClassifyActionsResults.ElementAt(1).ActionName); + IList expected = new List { "SingleCategoryClassify", "SingleCategoryClassifyWithDisabledServiceLogs" }; + CollectionAssert.AreEquivalent(expected, singleCategoryClassifyActionsResults.Select(result => result.ActionName)); } private void ValidateSummaryDocumentResult(ClassificationCategory classification) { From 4d0fb12122bef329beb1f05a4d0e2884ac44e0fc Mon Sep 17 00:00:00 2001 From: Salah Mostafa Date: Fri, 22 Oct 2021 02:42:31 +0200 Subject: [PATCH 13/16] reverted back ApiCompatBaseline.txt --- .../src/ApiCompatBaseline.txt | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ApiCompatBaseline.txt b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ApiCompatBaseline.txt index 54b5f9d0c492..972a0b750528 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/src/ApiCompatBaseline.txt +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/src/ApiCompatBaseline.txt @@ -1,12 +1,6 @@ -Compat issues with assembly Azure.AI.TextAnalytics: -MembersMustExist : Member 'public Azure.AI.TextAnalytics.AnalyzeSentimentActionResult Azure.AI.TextAnalytics.TextAnalyticsModelFactory.AnalyzeSentimentActionResult(Azure.AI.TextAnalytics.AnalyzeSentimentResultCollection, System.DateTimeOffset)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public Azure.AI.TextAnalytics.AnalyzeSentimentActionResult Azure.AI.TextAnalytics.TextAnalyticsModelFactory.AnalyzeSentimentActionResult(System.DateTimeOffset, System.String, System.String)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public Azure.AI.TextAnalytics.ExtractKeyPhrasesActionResult Azure.AI.TextAnalytics.TextAnalyticsModelFactory.ExtractKeyPhrasesActionResult(Azure.AI.TextAnalytics.ExtractKeyPhrasesResultCollection, System.DateTimeOffset)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public Azure.AI.TextAnalytics.ExtractKeyPhrasesActionResult Azure.AI.TextAnalytics.TextAnalyticsModelFactory.ExtractKeyPhrasesActionResult(System.DateTimeOffset, System.String, System.String)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public Azure.AI.TextAnalytics.RecognizeEntitiesActionResult Azure.AI.TextAnalytics.TextAnalyticsModelFactory.RecognizeEntitiesActionResult(Azure.AI.TextAnalytics.RecognizeEntitiesResultCollection, System.DateTimeOffset)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public Azure.AI.TextAnalytics.RecognizeEntitiesActionResult Azure.AI.TextAnalytics.TextAnalyticsModelFactory.RecognizeEntitiesActionResult(System.DateTimeOffset, System.String, System.String)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public Azure.AI.TextAnalytics.RecognizeLinkedEntitiesActionResult Azure.AI.TextAnalytics.TextAnalyticsModelFactory.RecognizeLinkedEntitiesActionResult(Azure.AI.TextAnalytics.RecognizeLinkedEntitiesResultCollection, System.DateTimeOffset)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public Azure.AI.TextAnalytics.RecognizeLinkedEntitiesActionResult Azure.AI.TextAnalytics.TextAnalyticsModelFactory.RecognizeLinkedEntitiesActionResult(System.DateTimeOffset, System.String, System.String)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public Azure.AI.TextAnalytics.RecognizePiiEntitiesActionResult Azure.AI.TextAnalytics.TextAnalyticsModelFactory.RecognizePiiEntitiesActionResult(Azure.AI.TextAnalytics.RecognizePiiEntitiesResultCollection, System.DateTimeOffset)' does not exist in the implementation but it does exist in the contract. -MembersMustExist : Member 'public Azure.AI.TextAnalytics.RecognizePiiEntitiesActionResult Azure.AI.TextAnalytics.TextAnalyticsModelFactory.RecognizePiiEntitiesActionResult(System.DateTimeOffset, System.String, System.String)' does not exist in the implementation but it does exist in the contract. -Total Issues: 10 +# Baselining these until the next GA. These are not really a compat issue we need to worry about because the properties were already readonly but we made the entire type readonly now which is where the attributes came from +CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'Azure.AI.TextAnalytics.TextAnalyticsError.ErrorCode.get()' in the contract but not the implementation. +CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'Azure.AI.TextAnalytics.TextAnalyticsError.Message.get()' in the contract but not the implementation. +CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'Azure.AI.TextAnalytics.TextAnalyticsError.Target.get()' in the contract but not the implementation. +CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'Azure.AI.TextAnalytics.TextAnalyticsWarning.Message.get()' in the contract but not the implementation. +CannotRemoveAttribute : Attribute 'System.Runtime.CompilerServices.IsReadOnlyAttribute' exists on 'Azure.AI.TextAnalytics.TextAnalyticsWarning.WarningCode.get()' in the contract but not the implementation. From 5e60ce264e0ab96ab2aa971f45d69a46dad6bcc1 Mon Sep 17 00:00:00 2001 From: Salah Mostafa Date: Mon, 25 Oct 2021 20:10:05 +0200 Subject: [PATCH 14/16] disabled AnalyzeOperationWithMultipleActionsOfSameType test --- .../Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs index 5e305cb6bd6c..d0986a634cd9 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs @@ -301,7 +301,7 @@ public async Task AnalyzeOperationWithMultipleActions() Assert.AreEqual(TextSentiment.Neutral, analyzeSentimentDocumentsResults[1].DocumentSentiment.Sentiment); } - [RecordedTest] + [Ignore("issue: results in an internal server error")] public async Task AnalyzeOperationWithMultipleActionsOfSameType() { TextAnalyticsClient client = GetClient(); From d5957c102c043fcb55078814a6fc5c927f05cb25 Mon Sep 17 00:00:00 2001 From: Salah Mostafa Date: Mon, 25 Oct 2021 20:14:48 +0200 Subject: [PATCH 15/16] minor change --- .../Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs index d0986a634cd9..edf17b20acaa 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/AnalyzeOperationTests.cs @@ -301,7 +301,7 @@ public async Task AnalyzeOperationWithMultipleActions() Assert.AreEqual(TextSentiment.Neutral, analyzeSentimentDocumentsResults[1].DocumentSentiment.Sentiment); } - [Ignore("issue: results in an internal server error")] + [Ignore("issue: results in an internal server error | bug link: https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/12413250")] public async Task AnalyzeOperationWithMultipleActionsOfSameType() { TextAnalyticsClient client = GetClient(); From 53286a39b2a89c9ee639ae2a35b675458c0bd950 Mon Sep 17 00:00:00 2001 From: Salah Mostafa Date: Mon, 25 Oct 2021 20:52:33 +0200 Subject: [PATCH 16/16] recorded AnalyzeSentimentTest --- .../AnalyzeSentimentWithMultipleActions.json | 1289 +++++++++++ ...lyzeSentimentWithMultipleActionsAsync.json | 2045 +++++++++++++++++ 2 files changed, 3334 insertions(+) create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AnalyzeSentimentTests/AnalyzeSentimentWithMultipleActions.json create mode 100644 sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AnalyzeSentimentTests/AnalyzeSentimentWithMultipleActionsAsync.json diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AnalyzeSentimentTests/AnalyzeSentimentWithMultipleActions.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AnalyzeSentimentTests/AnalyzeSentimentWithMultipleActions.json new file mode 100644 index 000000000000..853d3b838efd --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AnalyzeSentimentTests/AnalyzeSentimentWithMultipleActions.json @@ -0,0 +1,1289 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Content-Length": "483", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-98a99792a32f0644aade1778ad28c9e0-fc4d3760b1cb6840-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "d7ef8fc8067a039e9bfba18b79c28111", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "That was the best day of my life!. I had a lot of fun at the park.", + "language": "en" + }, + { + "id": "1", + "text": "I\u0027m not sure how I feel about this product. It is complicated.", + "language": "en" + } + ] + }, + "tasks": { + "sentimentAnalysisTasks": [ + { + "parameters": { + "loggingOptOut": true, + "stringIndexType": "Utf16CodeUnit" + }, + "taskName": "AnalyzeSentimentWithDisabledServiceLogs" + }, + { + "parameters": { + "stringIndexType": "Utf16CodeUnit" + }, + "taskName": "AnalyzeSentiment" + } + ] + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "90f72759-b227-48a2-8796-9841d90b9643", + "Date": "Mon, 25 Oct 2021 18:47:48 GMT", + "operation-location": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "319" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "b6f57274c91eff72e05ebd5651122253", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "f9775494-d3e8-4739-a592-a5301b5dd17d", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:47:48 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "112" + }, + "ResponseBody": { + "jobId": "a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "lastUpdateDateTime": "2021-10-25T18:47:48Z", + "createdDateTime": "2021-10-25T18:47:47Z", + "expirationDateTime": "2021-10-26T18:47:47Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "75457876211446db86ac360fe02e91f3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "08efe465-8840-41a3-98fd-ef47579d6866", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:47:50 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "133" + }, + "ResponseBody": { + "jobId": "a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "lastUpdateDateTime": "2021-10-25T18:47:48Z", + "createdDateTime": "2021-10-25T18:47:47Z", + "expirationDateTime": "2021-10-26T18:47:47Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "d257cbd43ff1fe741deff71b4947b288", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "27b7cacf-1fba-4c5b-b5d3-58d1d93e40b7", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:47:51 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "7" + }, + "ResponseBody": { + "jobId": "a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "lastUpdateDateTime": "2021-10-25T18:47:48Z", + "createdDateTime": "2021-10-25T18:47:47Z", + "expirationDateTime": "2021-10-26T18:47:47Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "00154dd80c7c53fc96af2f7292631fb2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "80378e20-a102-4baf-9698-a79d5c9e63cb", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:47:52 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "112" + }, + "ResponseBody": { + "jobId": "a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "lastUpdateDateTime": "2021-10-25T18:47:48Z", + "createdDateTime": "2021-10-25T18:47:47Z", + "expirationDateTime": "2021-10-26T18:47:47Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "8681cacd50bb36610446582529c0fc3f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "59ac958b-bcc8-41ea-854f-8d3c395bd369", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:47:53 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "27" + }, + "ResponseBody": { + "jobId": "a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "lastUpdateDateTime": "2021-10-25T18:47:48Z", + "createdDateTime": "2021-10-25T18:47:47Z", + "expirationDateTime": "2021-10-26T18:47:47Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "9236adfa9018c876ce043c4210016bb9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "a7017225-647d-4c3b-b164-7044df8ac599", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:47:54 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "49" + }, + "ResponseBody": { + "jobId": "a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "lastUpdateDateTime": "2021-10-25T18:47:48Z", + "createdDateTime": "2021-10-25T18:47:47Z", + "expirationDateTime": "2021-10-26T18:47:47Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "7e4d45d02bc588cdebdefc36b3d729d5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "1ca2fc40-fa7e-419a-9d48-f141db55f026", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:47:56 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "66" + }, + "ResponseBody": { + "jobId": "a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "lastUpdateDateTime": "2021-10-25T18:47:48Z", + "createdDateTime": "2021-10-25T18:47:47Z", + "expirationDateTime": "2021-10-26T18:47:47Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "e578f0b28c2c3d9953b8b8b6131f2602", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "4d2d9c36-b2e9-4f56-aa10-dcbf83a8dbdc", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:47:57 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "41" + }, + "ResponseBody": { + "jobId": "a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "lastUpdateDateTime": "2021-10-25T18:47:48Z", + "createdDateTime": "2021-10-25T18:47:47Z", + "expirationDateTime": "2021-10-26T18:47:47Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "e4549eda7e73ce79e0aea73a934015f6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "669fa388-4ff7-4b17-93f0-b4691810db1c", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:47:58 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "94" + }, + "ResponseBody": { + "jobId": "a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "lastUpdateDateTime": "2021-10-25T18:47:48Z", + "createdDateTime": "2021-10-25T18:47:47Z", + "expirationDateTime": "2021-10-26T18:47:47Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "1f8f66db8689438dac0f2b0c731774cb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "766d4e19-9845-40b4-9ee5-aa2d5308b9a8", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:47:59 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "64" + }, + "ResponseBody": { + "jobId": "a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "lastUpdateDateTime": "2021-10-25T18:48:00Z", + "createdDateTime": "2021-10-25T18:47:47Z", + "expirationDateTime": "2021-10-26T18:47:47Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "sentimentAnalysisTasks": [ + { + "lastUpdateDateTime": "2021-10-25T18:48:00.3990299Z", + "taskName": "AnalyzeSentiment", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "sentences": [ + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 0, + "length": 34, + "text": "That was the best day of my life!." + }, + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 35, + "length": 31, + "text": "I had a lot of fun at the park." + } + ], + "warnings": [] + }, + { + "id": "1", + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "sentences": [ + { + "sentiment": "neutral", + "confidenceScores": { + "positive": 0.02, + "neutral": 0.85, + "negative": 0.13 + }, + "offset": 0, + "length": 43, + "text": "I\u0027m not sure how I feel about this product." + }, + { + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "offset": 44, + "length": 18, + "text": "It is complicated." + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "145bfab84482346277aa057de55faa12", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "35f0aca3-57ca-41b9-a92d-200eca02de45", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:01 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "165" + }, + "ResponseBody": { + "jobId": "a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "lastUpdateDateTime": "2021-10-25T18:48:00Z", + "createdDateTime": "2021-10-25T18:47:47Z", + "expirationDateTime": "2021-10-26T18:47:47Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "sentimentAnalysisTasks": [ + { + "lastUpdateDateTime": "2021-10-25T18:48:00.3990299Z", + "taskName": "AnalyzeSentiment", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "sentences": [ + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 0, + "length": 34, + "text": "That was the best day of my life!." + }, + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 35, + "length": 31, + "text": "I had a lot of fun at the park." + } + ], + "warnings": [] + }, + { + "id": "1", + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "sentences": [ + { + "sentiment": "neutral", + "confidenceScores": { + "positive": 0.02, + "neutral": 0.85, + "negative": 0.13 + }, + "offset": 0, + "length": 43, + "text": "I\u0027m not sure how I feel about this product." + }, + { + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "offset": 44, + "length": 18, + "text": "It is complicated." + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "addac1a30690537911113863526c5ac8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "d6a98ac3-7351-4ab6-b99a-8cd6a5f89af5", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:02 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "71" + }, + "ResponseBody": { + "jobId": "a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "lastUpdateDateTime": "2021-10-25T18:48:00Z", + "createdDateTime": "2021-10-25T18:47:47Z", + "expirationDateTime": "2021-10-26T18:47:47Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "sentimentAnalysisTasks": [ + { + "lastUpdateDateTime": "2021-10-25T18:48:00.3990299Z", + "taskName": "AnalyzeSentiment", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "sentences": [ + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 0, + "length": 34, + "text": "That was the best day of my life!." + }, + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 35, + "length": 31, + "text": "I had a lot of fun at the park." + } + ], + "warnings": [] + }, + { + "id": "1", + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "sentences": [ + { + "sentiment": "neutral", + "confidenceScores": { + "positive": 0.02, + "neutral": 0.85, + "negative": 0.13 + }, + "offset": 0, + "length": 43, + "text": "I\u0027m not sure how I feel about this product." + }, + { + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "offset": 44, + "length": 18, + "text": "It is complicated." + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "9981db3a00e49673035aa8de810f5d4d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "cb686314-cfcb-472e-a030-56f982d0eb61", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:03 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "122" + }, + "ResponseBody": { + "jobId": "a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "lastUpdateDateTime": "2021-10-25T18:48:00Z", + "createdDateTime": "2021-10-25T18:47:47Z", + "expirationDateTime": "2021-10-26T18:47:47Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "sentimentAnalysisTasks": [ + { + "lastUpdateDateTime": "2021-10-25T18:48:00.3990299Z", + "taskName": "AnalyzeSentiment", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "sentences": [ + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 0, + "length": 34, + "text": "That was the best day of my life!." + }, + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 35, + "length": 31, + "text": "I had a lot of fun at the park." + } + ], + "warnings": [] + }, + { + "id": "1", + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "sentences": [ + { + "sentiment": "neutral", + "confidenceScores": { + "positive": 0.02, + "neutral": 0.85, + "negative": 0.13 + }, + "offset": 0, + "length": 43, + "text": "I\u0027m not sure how I feel about this product." + }, + { + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "offset": 44, + "length": 18, + "text": "It is complicated." + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "b2681865c63cb23b800703710cfee10a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "429c96a1-3c20-45b4-a65d-4dff63c76bc7", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:05 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "106" + }, + "ResponseBody": { + "jobId": "a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "lastUpdateDateTime": "2021-10-25T18:48:00Z", + "createdDateTime": "2021-10-25T18:47:47Z", + "expirationDateTime": "2021-10-26T18:47:47Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "sentimentAnalysisTasks": [ + { + "lastUpdateDateTime": "2021-10-25T18:48:00.3990299Z", + "taskName": "AnalyzeSentiment", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "sentences": [ + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 0, + "length": 34, + "text": "That was the best day of my life!." + }, + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 35, + "length": 31, + "text": "I had a lot of fun at the park." + } + ], + "warnings": [] + }, + { + "id": "1", + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "sentences": [ + { + "sentiment": "neutral", + "confidenceScores": { + "positive": 0.02, + "neutral": 0.85, + "negative": 0.13 + }, + "offset": 0, + "length": 43, + "text": "I\u0027m not sure how I feel about this product." + }, + { + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "offset": 44, + "length": 18, + "text": "It is complicated." + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "0a433c5010dda32e4d44a9355d9ad202", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "ebb3ff1e-0e4e-40d9-8f19-55e8b2a11ad6", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:06 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "228" + }, + "ResponseBody": { + "jobId": "a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "lastUpdateDateTime": "2021-10-25T18:48:00Z", + "createdDateTime": "2021-10-25T18:47:47Z", + "expirationDateTime": "2021-10-26T18:47:47Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "sentimentAnalysisTasks": [ + { + "lastUpdateDateTime": "2021-10-25T18:48:00.3990299Z", + "taskName": "AnalyzeSentiment", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "sentences": [ + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 0, + "length": 34, + "text": "That was the best day of my life!." + }, + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 35, + "length": 31, + "text": "I had a lot of fun at the park." + } + ], + "warnings": [] + }, + { + "id": "1", + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "sentences": [ + { + "sentiment": "neutral", + "confidenceScores": { + "positive": 0.02, + "neutral": 0.85, + "negative": 0.13 + }, + "offset": 0, + "length": 43, + "text": "I\u0027m not sure how I feel about this product." + }, + { + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "offset": 44, + "length": 18, + "text": "It is complicated." + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "3afeeab3a703738c9fcf18ddfc028905", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "9b8deae9-4c7e-4f05-90c1-cdb1776e306e", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:09 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "322" + }, + "ResponseBody": { + "jobId": "a6c06233-04c8-4662-84c7-c6d3cfa72e3e", + "lastUpdateDateTime": "2021-10-25T18:48:08Z", + "createdDateTime": "2021-10-25T18:47:47Z", + "expirationDateTime": "2021-10-26T18:47:47Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 2, + "failed": 0, + "inProgress": 0, + "total": 2, + "sentimentAnalysisTasks": [ + { + "lastUpdateDateTime": "2021-10-25T18:48:08.5864845Z", + "taskName": "AnalyzeSentimentWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "sentences": [ + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 0, + "length": 34, + "text": "That was the best day of my life!." + }, + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 35, + "length": 31, + "text": "I had a lot of fun at the park." + } + ], + "warnings": [] + }, + { + "id": "1", + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "sentences": [ + { + "sentiment": "neutral", + "confidenceScores": { + "positive": 0.02, + "neutral": 0.85, + "negative": 0.13 + }, + "offset": 0, + "length": 43, + "text": "I\u0027m not sure how I feel about this product." + }, + { + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "offset": 44, + "length": 18, + "text": "It is complicated." + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + }, + { + "lastUpdateDateTime": "2021-10-25T18:48:00.3990299Z", + "taskName": "AnalyzeSentiment", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "sentences": [ + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 0, + "length": 34, + "text": "That was the best day of my life!." + }, + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 35, + "length": 31, + "text": "I had a lot of fun at the park." + } + ], + "warnings": [] + }, + { + "id": "1", + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "sentences": [ + { + "sentiment": "neutral", + "confidenceScores": { + "positive": 0.02, + "neutral": 0.85, + "negative": 0.13 + }, + "offset": 0, + "length": 43, + "text": "I\u0027m not sure how I feel about this product." + }, + { + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "offset": 44, + "length": 18, + "text": "It is complicated." + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "382468166", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticstestresources.cognitiveservices.azure.com/" + } +} \ No newline at end of file diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AnalyzeSentimentTests/AnalyzeSentimentWithMultipleActionsAsync.json b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AnalyzeSentimentTests/AnalyzeSentimentWithMultipleActionsAsync.json new file mode 100644 index 000000000000..ad76ebcf8c09 --- /dev/null +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/tests/SessionRecords/AnalyzeSentimentTests/AnalyzeSentimentWithMultipleActionsAsync.json @@ -0,0 +1,2045 @@ +{ + "Entries": [ + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Content-Length": "483", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "traceparent": "00-b71dd92abb6c974988e29ea8b66ed4e1-c06ce9743d8ecd48-00", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "af7a81d59f0d0662a00424cc54613f1a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "analysisInput": { + "documents": [ + { + "id": "0", + "text": "That was the best day of my life!. I had a lot of fun at the park.", + "language": "en" + }, + { + "id": "1", + "text": "I\u0027m not sure how I feel about this product. It is complicated.", + "language": "en" + } + ] + }, + "tasks": { + "sentimentAnalysisTasks": [ + { + "parameters": { + "loggingOptOut": true, + "stringIndexType": "Utf16CodeUnit" + }, + "taskName": "AnalyzeSentimentWithDisabledServiceLogs" + }, + { + "parameters": { + "stringIndexType": "Utf16CodeUnit" + }, + "taskName": "AnalyzeSentiment" + } + ] + } + }, + "StatusCode": 202, + "ResponseHeaders": { + "apim-request-id": "775ed3f1-1949-45de-bacf-d17850a25a4f", + "Date": "Mon, 25 Oct 2021 18:48:10 GMT", + "operation-location": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "233" + }, + "ResponseBody": [] + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "8a1d031a54c087c9bc81023a09f79e72", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "816ab4df-66a2-482b-bdf1-729dca862edc", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:10 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "9" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:10Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "d4e02b8ed8bf01c6e4d74fd8018e92e2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "64f91c3a-d7fe-4a34-bcc5-52d522ede5ae", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:12 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:10Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "d947ee9db44a81ddb8f3f38b9c28fda9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "5a8d9224-2701-4ec3-b5dc-0f2f5a058c3a", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:13 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:10Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "283db1666b81415b3d1ca6e805f1852d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "e79c3eec-6bdb-4d56-bca6-9f5ab489f5b6", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:14 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "7" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:10Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "1a9c1feec4afda284e5e1bcce43a64bc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "1bd527a2-d147-4783-9520-9955dc2833b8", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:16 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "122" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:10Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "5071a5da6a51326193059c2e0df57cc6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "55419670-4cef-4ed6-96cd-6b734d1716ee", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:17 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "11" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:10Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "7c9cc66de28ba1f98862da224f8f5d02", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "3c68ab15-28c9-47ca-9940-0b48100fab7b", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:18 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:10Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "5f0ee9b7357f84dcbe6a87aa28facc58", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "7ec469e4-83e2-4a6c-a030-2dbb53c1a191", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:19 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "49" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:10Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "1e5e55e2e79df730abcfc7ee903ee304", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "f9a07537-6d64-4fa4-9394-430d7a700fa9", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:21 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "10" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:10Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "23769aa81ce63746ea18be215b4f798e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "7b8802ea-7b7d-41ac-9881-74c768265823", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:22 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:10Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "fa3f81963f30d064b917b3af6dedf47f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "af240eea-aa11-44a2-9932-e2560e7638d8", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:23 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "15" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:10Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "8e028386a884c6720e263485290f9c5c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "5d4fde38-d929-4e8f-a493-7090e148a13a", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:24 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "8" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:10Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "0e583956e9fe69d335a66acf6896cafc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "249bc21f-65c9-4935-96a7-d60f417bf286", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:25 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "14" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:10Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "d89a3e24eb4ded0a0f79eb090bdfa7a9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "c14730b1-fb2a-4382-8d1f-8c26f2dafbbd", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:27 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "10" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:10Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "3459577ae5959d80af9958dd3da25d77", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "6ba24a9b-25c6-4e8a-9176-72b60220ac5e", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:28 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "38" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:10Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "ea60385cc3746a0f2e6aff85fdc95e55", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "a271b3f2-406b-45af-9d45-5e4bcc6bfa13", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:29 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "16" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:10Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "1154c1fe953d3f66bdfc28b3922caf6c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "522bc42a-4499-4e6f-a107-639731e10097", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:30 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "7" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:10Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 0, + "failed": 0, + "inProgress": 2, + "total": 2 + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "d3ac731cbc7eb73448ee052ae5fba0e5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "90745660-0623-4c7d-aaa2-1a1904a238c9", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:31 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "71" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:32Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "sentimentAnalysisTasks": [ + { + "lastUpdateDateTime": "2021-10-25T18:48:32.2923129Z", + "taskName": "AnalyzeSentiment", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "sentences": [ + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 0, + "length": 34, + "text": "That was the best day of my life!." + }, + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 35, + "length": 31, + "text": "I had a lot of fun at the park." + } + ], + "warnings": [] + }, + { + "id": "1", + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "sentences": [ + { + "sentiment": "neutral", + "confidenceScores": { + "positive": 0.02, + "neutral": 0.85, + "negative": 0.13 + }, + "offset": 0, + "length": 43, + "text": "I\u0027m not sure how I feel about this product." + }, + { + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "offset": 44, + "length": 18, + "text": "It is complicated." + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "7cde023b4c4ec73ad1212c789b5bd702", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "def26118-0b41-45a6-8420-b633007feecd", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:33 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "73" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:32Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "sentimentAnalysisTasks": [ + { + "lastUpdateDateTime": "2021-10-25T18:48:32.2923129Z", + "taskName": "AnalyzeSentiment", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "sentences": [ + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 0, + "length": 34, + "text": "That was the best day of my life!." + }, + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 35, + "length": 31, + "text": "I had a lot of fun at the park." + } + ], + "warnings": [] + }, + { + "id": "1", + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "sentences": [ + { + "sentiment": "neutral", + "confidenceScores": { + "positive": 0.02, + "neutral": 0.85, + "negative": 0.13 + }, + "offset": 0, + "length": 43, + "text": "I\u0027m not sure how I feel about this product." + }, + { + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "offset": 44, + "length": 18, + "text": "It is complicated." + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "896893bb8b1d42d78c9dc94e8f3b59c2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "07a47f5c-47f6-4945-a1a5-b8711690454e", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:34 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "103" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:32Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "sentimentAnalysisTasks": [ + { + "lastUpdateDateTime": "2021-10-25T18:48:32.2923129Z", + "taskName": "AnalyzeSentiment", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "sentences": [ + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 0, + "length": 34, + "text": "That was the best day of my life!." + }, + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 35, + "length": 31, + "text": "I had a lot of fun at the park." + } + ], + "warnings": [] + }, + { + "id": "1", + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "sentences": [ + { + "sentiment": "neutral", + "confidenceScores": { + "positive": 0.02, + "neutral": 0.85, + "negative": 0.13 + }, + "offset": 0, + "length": 43, + "text": "I\u0027m not sure how I feel about this product." + }, + { + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "offset": 44, + "length": 18, + "text": "It is complicated." + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "9078435c324dd01e39e5015d8fbc1cec", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "22ea5420-8e3d-4f45-b909-65df2e8e4bba", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:35 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "81" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:32Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "sentimentAnalysisTasks": [ + { + "lastUpdateDateTime": "2021-10-25T18:48:32.2923129Z", + "taskName": "AnalyzeSentiment", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "sentences": [ + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 0, + "length": 34, + "text": "That was the best day of my life!." + }, + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 35, + "length": 31, + "text": "I had a lot of fun at the park." + } + ], + "warnings": [] + }, + { + "id": "1", + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "sentences": [ + { + "sentiment": "neutral", + "confidenceScores": { + "positive": 0.02, + "neutral": 0.85, + "negative": 0.13 + }, + "offset": 0, + "length": 43, + "text": "I\u0027m not sure how I feel about this product." + }, + { + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "offset": 44, + "length": 18, + "text": "It is complicated." + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "526f03171693afc82b9cf0b082ec3796", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "e849d28e-ad52-492a-a04d-243a4b8b9123", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:37 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "78" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:32Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "sentimentAnalysisTasks": [ + { + "lastUpdateDateTime": "2021-10-25T18:48:32.2923129Z", + "taskName": "AnalyzeSentiment", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "sentences": [ + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 0, + "length": 34, + "text": "That was the best day of my life!." + }, + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 35, + "length": 31, + "text": "I had a lot of fun at the park." + } + ], + "warnings": [] + }, + { + "id": "1", + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "sentences": [ + { + "sentiment": "neutral", + "confidenceScores": { + "positive": 0.02, + "neutral": 0.85, + "negative": 0.13 + }, + "offset": 0, + "length": 43, + "text": "I\u0027m not sure how I feel about this product." + }, + { + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "offset": 44, + "length": 18, + "text": "It is complicated." + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "571b6ac747e288b4759850388979b2cf", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "3c3324f5-8f15-4a55-8620-0a0dd9b0e49b", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:38 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "243" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:32Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "sentimentAnalysisTasks": [ + { + "lastUpdateDateTime": "2021-10-25T18:48:32.2923129Z", + "taskName": "AnalyzeSentiment", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "sentences": [ + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 0, + "length": 34, + "text": "That was the best day of my life!." + }, + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 35, + "length": 31, + "text": "I had a lot of fun at the park." + } + ], + "warnings": [] + }, + { + "id": "1", + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "sentences": [ + { + "sentiment": "neutral", + "confidenceScores": { + "positive": 0.02, + "neutral": 0.85, + "negative": 0.13 + }, + "offset": 0, + "length": 43, + "text": "I\u0027m not sure how I feel about this product." + }, + { + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "offset": 44, + "length": 18, + "text": "It is complicated." + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "8c37dc8107cb462f7ac864b0426d4d4d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "af0730de-8147-469a-bbdd-60cd025b5960", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:39 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "67" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:32Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "sentimentAnalysisTasks": [ + { + "lastUpdateDateTime": "2021-10-25T18:48:32.2923129Z", + "taskName": "AnalyzeSentiment", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "sentences": [ + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 0, + "length": 34, + "text": "That was the best day of my life!." + }, + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 35, + "length": 31, + "text": "I had a lot of fun at the park." + } + ], + "warnings": [] + }, + { + "id": "1", + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "sentences": [ + { + "sentiment": "neutral", + "confidenceScores": { + "positive": 0.02, + "neutral": 0.85, + "negative": 0.13 + }, + "offset": 0, + "length": 43, + "text": "I\u0027m not sure how I feel about this product." + }, + { + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "offset": 44, + "length": 18, + "text": "It is complicated." + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "25956badc4a0cf0a4ee6dcfac59026b1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "e68aad60-f67b-4b7f-97e3-4daa39a51c7c", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:41 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "62" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:32Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "sentimentAnalysisTasks": [ + { + "lastUpdateDateTime": "2021-10-25T18:48:32.2923129Z", + "taskName": "AnalyzeSentiment", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "sentences": [ + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 0, + "length": 34, + "text": "That was the best day of my life!." + }, + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 35, + "length": 31, + "text": "I had a lot of fun at the park." + } + ], + "warnings": [] + }, + { + "id": "1", + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "sentences": [ + { + "sentiment": "neutral", + "confidenceScores": { + "positive": 0.02, + "neutral": 0.85, + "negative": 0.13 + }, + "offset": 0, + "length": 43, + "text": "I\u0027m not sure how I feel about this product." + }, + { + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "offset": 44, + "length": 18, + "text": "It is complicated." + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "a62f20eaaab5c0ca3bd5dc19e3044607", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "ca4efcf4-d784-4276-9d3f-1b08c2e50d37", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:42 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "146" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:32Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "sentimentAnalysisTasks": [ + { + "lastUpdateDateTime": "2021-10-25T18:48:32.2923129Z", + "taskName": "AnalyzeSentiment", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "sentences": [ + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 0, + "length": 34, + "text": "That was the best day of my life!." + }, + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 35, + "length": 31, + "text": "I had a lot of fun at the park." + } + ], + "warnings": [] + }, + { + "id": "1", + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "sentences": [ + { + "sentiment": "neutral", + "confidenceScores": { + "positive": 0.02, + "neutral": 0.85, + "negative": 0.13 + }, + "offset": 0, + "length": 43, + "text": "I\u0027m not sure how I feel about this product." + }, + { + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "offset": 44, + "length": 18, + "text": "It is complicated." + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "1e8a034a8ce4bc2fd2673ee42a3480ea", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "a95b5eeb-58d3-4350-9913-27b86cf302da", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:43 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "111" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:32Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "running", + "errors": [], + "tasks": { + "completed": 1, + "failed": 0, + "inProgress": 1, + "total": 2, + "sentimentAnalysisTasks": [ + { + "lastUpdateDateTime": "2021-10-25T18:48:32.2923129Z", + "taskName": "AnalyzeSentiment", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "sentences": [ + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 0, + "length": 34, + "text": "That was the best day of my life!." + }, + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 35, + "length": 31, + "text": "I had a lot of fun at the park." + } + ], + "warnings": [] + }, + { + "id": "1", + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "sentences": [ + { + "sentiment": "neutral", + "confidenceScores": { + "positive": 0.02, + "neutral": 0.85, + "negative": 0.13 + }, + "offset": 0, + "length": 43, + "text": "I\u0027m not sure how I feel about this product." + }, + { + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "offset": 44, + "length": 18, + "text": "It is complicated." + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + ] + } + } + }, + { + "RequestUri": "https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json, text/json", + "Ocp-Apim-Subscription-Key": "Sanitized", + "User-Agent": "azsdk-net-AI.TextAnalytics/5.2.0-alpha.20211025.1 (.NET Framework 4.8.4341.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "21c6b2a2a73e0298a0d5e9cbe7f0ec4a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "apim-request-id": "4c5959b1-c56b-49f2-8893-4b9b82431809", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 25 Oct 2021 18:48:46 GMT", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload", + "Transfer-Encoding": "chunked", + "x-content-type-options": "nosniff", + "x-envoy-upstream-service-time": "116" + }, + "ResponseBody": { + "jobId": "572c463d-0478-42d0-9ef8-a8d3c2f4ca73", + "lastUpdateDateTime": "2021-10-25T18:48:45Z", + "createdDateTime": "2021-10-25T18:48:10Z", + "expirationDateTime": "2021-10-26T18:48:10Z", + "status": "succeeded", + "errors": [], + "tasks": { + "completed": 2, + "failed": 0, + "inProgress": 0, + "total": 2, + "sentimentAnalysisTasks": [ + { + "lastUpdateDateTime": "2021-10-25T18:48:45.6924975Z", + "taskName": "AnalyzeSentimentWithDisabledServiceLogs", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "sentences": [ + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 0, + "length": 34, + "text": "That was the best day of my life!." + }, + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 35, + "length": 31, + "text": "I had a lot of fun at the park." + } + ], + "warnings": [] + }, + { + "id": "1", + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "sentences": [ + { + "sentiment": "neutral", + "confidenceScores": { + "positive": 0.02, + "neutral": 0.85, + "negative": 0.13 + }, + "offset": 0, + "length": 43, + "text": "I\u0027m not sure how I feel about this product." + }, + { + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "offset": 44, + "length": 18, + "text": "It is complicated." + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + }, + { + "lastUpdateDateTime": "2021-10-25T18:48:32.2923129Z", + "taskName": "AnalyzeSentiment", + "state": "succeeded", + "results": { + "documents": [ + { + "id": "0", + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "sentences": [ + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 0, + "length": 34, + "text": "That was the best day of my life!." + }, + { + "sentiment": "positive", + "confidenceScores": { + "positive": 1.0, + "neutral": 0.0, + "negative": 0.0 + }, + "offset": 35, + "length": 31, + "text": "I had a lot of fun at the park." + } + ], + "warnings": [] + }, + { + "id": "1", + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "sentences": [ + { + "sentiment": "neutral", + "confidenceScores": { + "positive": 0.02, + "neutral": 0.85, + "negative": 0.13 + }, + "offset": 0, + "length": 43, + "text": "I\u0027m not sure how I feel about this product." + }, + { + "sentiment": "negative", + "confidenceScores": { + "positive": 0.0, + "neutral": 0.0, + "negative": 1.0 + }, + "offset": 44, + "length": 18, + "text": "It is complicated." + } + ], + "warnings": [] + } + ], + "errors": [], + "modelVersion": "2020-04-01" + } + } + ] + } + } + } + ], + "Variables": { + "RandomSeed": "521398718", + "TEXT_ANALYTICS_API_KEY": "Sanitized", + "TEXT_ANALYTICS_ENDPOINT": "https://javatextanalyticstestresources.cognitiveservices.azure.com/" + } +} \ No newline at end of file