Skip to content

Commit

Permalink
[Text Analytics] Re-generate code based on API version 2023-04-01 (#3…
Browse files Browse the repository at this point in the history
  • Loading branch information
joseharriaga committed Jun 6, 2023
1 parent 173e3b5 commit 645de0a
Show file tree
Hide file tree
Showing 198 changed files with 548 additions and 7,225 deletions.
2 changes: 2 additions & 0 deletions sdk/textanalytics/Azure.AI.TextAnalytics/CHANGELOG.md
Expand Up @@ -42,6 +42,8 @@

### Other Changes

The client now defaults to targeting service API version `2023-04-01`.

## 5.3.0-beta.3 (2023-03-11)

### Other Changes
Expand Down
4 changes: 1 addition & 3 deletions sdk/textanalytics/Azure.AI.TextAnalytics/README.md
Expand Up @@ -32,7 +32,7 @@ This table shows the relationship between SDK versions and supported API version
|SDK version |Supported API version of service
|-------------|-----------------------------------------------------|
|5.3.0-beta.2 | 3.0, 3.1, 2022-05-01, 2022-10-01-preview (default)
|5.3.0-beta.4 | 3.0, 3.1, 2022-05-01, 2023-04-01 (default)
|5.2.0 | 3.0, 3.1, 2022-05-01 (default)
|5.1.X | 3.0, 3.1 (default)
|5.0.0 | 3.0
Expand Down Expand Up @@ -764,7 +764,6 @@ Samples are provided for each main functional area, and for each area, samples a
* [Understand how to work with long-running operations][lro_sample]
* [Running multiple actions in one or more documents][analyze_operation_sample]
* [Analyze Sentiment with Opinion Mining][analyze_sentiment_opinion_mining_sample]
* [Resolve entities to standard formats with NER resolutions][ner_resolutions_sample]
* [Mock a client for testing][mock_client_sample] using the [Moq][moq] library

## Contributing
Expand All @@ -790,7 +789,6 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con
[lro_sample]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample_LROPolling.md
[analyze_operation_sample]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample_AnalyzeActions.md
[analyze_sentiment_opinion_mining_sample]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample2.1_AnalyzeSentimentWithOpinionMining.md
[ner_resolutions_sample]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample_RecognizeEntitiesWithResolutions.md
[mock_client_sample]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample_MockClient.md

[healthcare]: https://docs.microsoft.com/azure/cognitive-services/language-service/text-analytics-for-health/overview?tabs=ner
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sdk/textanalytics/Azure.AI.TextAnalytics/assets.json
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "net",
"TagPrefix": "net/textanalytics/Azure.AI.TextAnalytics",
"Tag": "net/textanalytics/Azure.AI.TextAnalytics_d876a50505"
"Tag": "net/textanalytics/Azure.AI.TextAnalytics_b4a81c595d"
}
Expand Up @@ -26,13 +26,13 @@ private PerfTestEnvironment()
/// <summary>
/// The endpoint of the Text Analytics account to test against.
/// </summary>
/// <value>The endpoint, read from the "TEXT_ANALYTICS_ENDPOINT" environment variable.</value>
public string Endpoint => GetVariable("TEXT_ANALYTICS_ENDPOINT");
/// <value>The endpoint, read from the "TEXTANALYTICS_ENDPOINT" environment variable.</value>
public string Endpoint => GetVariable("TEXTANALYTICS_ENDPOINT");

/// <summary>
/// The API key of the Text Analytics account to test against.
/// </summary>
/// <value>The API key, read from the "TEXT_ANALYTICS_API_KEY" environment variable.</value>
public string ApiKey => GetVariable("TEXT_ANALYTICS_API_KEY");
/// <value>The API key, read from the "TEXTANALYTICS_API_KEY" environment variable.</value>
public string ApiKey => GetVariable("TEXTANALYTICS_API_KEY");
}
}
1 change: 0 additions & 1 deletion sdk/textanalytics/Azure.AI.TextAnalytics/samples/README.md
Expand Up @@ -48,7 +48,6 @@ See the [README][README] of the Text Analytics client library for more informati
* [Understand how to work with long-running operations](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample_LROPolling.md)
* [Running multiple actions in one or more documents](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample_AnalyzeActions.md)
* [Analyze Sentiment with Opinion Mining](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample2.1_AnalyzeSentimentWithOpinionMining.md)
* [Resolve entities to standard formats with NER resolutions](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample_RecognizeEntitiesWithResolutions.md)
* [Recognize PII Entities with specific categories](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample5_RecognizePiiEntitiesWithCategoriesFilter.cs)
* [Mock a client for testing](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample_MockClient.md) using the [Moq](https://github.com/Moq/moq4/) library

Expand Down
Expand Up @@ -194,8 +194,6 @@ foreach (DetectLanguageResult documentLanguage in documentsLanguage)

Console.WriteLine($" Detected language: {documentLanguage.PrimaryLanguage.Name}");
Console.WriteLine($" Confidence score: {documentLanguage.PrimaryLanguage.ConfidenceScore}");
if (documentLanguage.PrimaryLanguage.Script is not null)
Console.WriteLine($" Script: {documentLanguage.PrimaryLanguage.Script}");

Console.WriteLine($" Document statistics:");
Console.WriteLine($" Character count: {documentLanguage.Statistics.CharacterCount}");
Expand Down

This file was deleted.

Expand Up @@ -21,16 +21,13 @@ public partial class AbstractiveSummarizeResult : TextAnalyticsResult
string id,
TextDocumentStatistics statistics,
IList<AbstractiveSummary> summaries,
DetectedLanguage? detectedLanguage,
IList<TextAnalyticsWarning> warnings)
: base(id, statistics)
{
_summaries = (summaries is not null)
? new ReadOnlyCollection<AbstractiveSummary>(summaries)
: new List<AbstractiveSummary>();

DetectedLanguage = detectedLanguage;

Warnings = (warnings is not null)
? new ReadOnlyCollection<TextAnalyticsWarning>(warnings)
: new List<TextAnalyticsWarning>();
Expand All @@ -46,12 +43,6 @@ public partial class AbstractiveSummarizeResult : TextAnalyticsResult
/// </summary>
public IReadOnlyCollection<TextAnalyticsWarning> Warnings { get; } = new List<TextAnalyticsWarning>();

/// <summary>
/// The language of the input document as detected by the service when requested to perform automatic language
/// detection, which is possible by specifying "auto" as the language of the input document.
/// </summary>
public DetectedLanguage? DetectedLanguage { get; }

/// <summary>
/// The collection of resulting summaries corresponding to the input document.
/// </summary>
Expand Down
Expand Up @@ -23,15 +23,11 @@ public AnalyzeHealthcareEntitiesAction()
/// <summary>
/// Initializes a new instance of the <see cref="AnalyzeHealthcareEntitiesAction"/>
/// class based on the values of a <see cref="AnalyzeHealthcareEntitiesOptions"/>.
/// It sets the <see cref="ModelVersion"/>, <see cref="DisableServiceLogs"/>,
/// <see cref="FhirVersion"/>, and <see cref="DocumentType"/> properties.
/// </summary>
public AnalyzeHealthcareEntitiesAction(AnalyzeHealthcareEntitiesOptions options)
{
ModelVersion = options.ModelVersion;
DisableServiceLogs = options.DisableServiceLogs;
FhirVersion = options.FhirVersion;
DocumentType = options.DocumentType;
}

/// <summary>
Expand All @@ -57,19 +53,5 @@ public AnalyzeHealthcareEntitiesAction(AnalyzeHealthcareEntitiesOptions options)
/// Gets or sets a name for this action. If not provided, the service will generate one.
/// </summary>
public string ActionName { get; set; }

/// <summary>
/// The version of the FHIR specification that will be used to format the <see cref="AnalyzeHealthcareEntitiesResult.FhirBundle"/>
/// in the result. If not set, the <see cref="AnalyzeHealthcareEntitiesResult.FhirBundle"/> will not be produced. For additional information, see
/// <see href="https://www.hl7.org/fhir/overview.html"/>.
/// </summary>
public FhirVersion? FhirVersion { get; set; }

/// <summary>
/// The document type, which can be provided as a hint to improve the production of the <see cref="AnalyzeHealthcareEntitiesResult.FhirBundle"/> when
/// the <see cref="AnalyzeHealthcareEntitiesOptions.FhirVersion"/> property is specified. The default behavior is equivalent to using
/// <see cref="HealthcareDocumentType.None"/>.
/// </summary>
public HealthcareDocumentType? DocumentType { get; set; }
}
}
Expand Up @@ -25,33 +25,11 @@ public AnalyzeHealthcareEntitiesOptions()
/// </remarks>
public string DisplayName { get; set; }

/// <summary>
/// The version of the FHIR specification that will be used to format the <see cref="AnalyzeHealthcareEntitiesResult.FhirBundle"/>
/// in the result. If not set, the <see cref="AnalyzeHealthcareEntitiesResult.FhirBundle"/> will not be produced. For additional information, see
/// <see href="https://www.hl7.org/fhir/overview.html"/>.
/// </summary>
/// <remarks>
/// This property only applies for <see cref="TextAnalyticsClientOptions.ServiceVersion.V2022_10_01_Preview"/>, and newer.
/// </remarks>
public FhirVersion? FhirVersion { get; set; }

/// <summary>
/// The document type, which can be provided as a hint to improve the production of the <see cref="AnalyzeHealthcareEntitiesResult.FhirBundle"/> when
/// the <see cref="AnalyzeHealthcareEntitiesOptions.FhirVersion"/> property is specified. The default behavior is equivalent to using
/// <see cref="HealthcareDocumentType.None"/>.
/// </summary>
/// <remarks>
/// This property only applies for <see cref="TextAnalyticsClientOptions.ServiceVersion.V2022_10_01_Preview"/>, and newer.
/// </remarks>
public HealthcareDocumentType? DocumentType { get; set; }

/// <inheritdoc/>
internal override void CheckSupported(TextAnalyticsClientOptions.ServiceVersion current)
{
base.CheckSupported(current);
Validation.SupportsProperty(this, DisplayName, nameof(DisplayName), TextAnalyticsClientOptions.ServiceVersion.V2022_05_01, current);
Validation.SupportsProperty(this, FhirVersion, nameof(FhirVersion), TextAnalyticsClientOptions.ServiceVersion.V2022_10_01_Preview, current);
Validation.SupportsProperty(this, DocumentType, nameof(DocumentType), TextAnalyticsClientOptions.ServiceVersion.V2022_10_01_Preview, current);
}
}
}

0 comments on commit 645de0a

Please sign in to comment.