From 735dc2caa5ae77680cdf8ff70138043de159e30d Mon Sep 17 00:00:00 2001 From: Jose Arriaga Maldonado Date: Thu, 12 Jan 2023 17:44:16 -0800 Subject: [PATCH 1/3] Edit README section about Azure CLI --- .../Azure.AI.TextAnalytics/README.md | 69 ++----------------- 1 file changed, 5 insertions(+), 64 deletions(-) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/README.md b/sdk/textanalytics/Azure.AI.TextAnalytics/README.md index 572d908c4c76f..96a57b8b8abb2 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/README.md +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/README.md @@ -17,9 +17,7 @@ Text Analytics is part of the Azure Cognitive Service for Language, a cloud-base [Source code][textanalytics_client_src] | [Package (NuGet)][textanalytics_nuget_package] | [API reference documentation][textanalytics_refdocs] | [Product documentation][language_service_docs] | [Samples][textanalytics_samples] ## Getting started - ### Install the package - Install the Azure Text Analytics client library for .NET with [NuGet][nuget]: ```dotnetcli @@ -39,47 +37,18 @@ This table shows the relationship between SDK versions and supported API version |1.0.X | 3.0 ### Prerequisites - * An [Azure subscription][azure_sub]. * An existing Cognitive Services or Language service resource. -#### Create a Cognitive Services or Language service resource - -The Language service supports both [multi-service and single-service access][cognitive_resource_portal]. Create a Cognitive Services resource if you plan to access multiple cognitive services under a single endpoint/key. For Language service access only, create a Language service resource. - -You can create either resource using: - -**Option 1:** [Azure Portal][cognitive_resource_portal]. +#### Create a Cognitive Services resource or a Language service resource +Azure Cognitive Service for Language supports both [multi-service and single-service access][cognitive_resource_portal]. Create a Cognitive Services resource if you plan to access multiple cognitive services under a single endpoint and API key. To access the features of the Language service only, create a Language service resource instead. -**Option 2:** [Azure CLI][cognitive_resource_cli]. - -Below is an example of how you can create a Language service resource using the CLI: - -```PowerShell -# Create a new resource group to hold the Language service resource - -# if using an existing resource group, skip this step -az group create --name --location -``` - -```PowerShell -# Create Text Analytics -az cognitiveservices account create \ - --name \ - --resource-group \ - --kind TextAnalytics \ - --sku \ - --location \ - --yes -``` - -For more information about creating the resource or how to get the location and sku information see [here][cognitive_resource_cli]. +You can create either resource via the [Azure portal][azure_portal_create_ta_resource] or, alternatively, you can follow the steps in [this document][azure_cli_create_ta_resource] to create it using the [Azure CLI][azure_cli]. ### Authenticate the client - Interaction with the service using the client library begins with creating an instance of the [TextAnalyticsClient][textanalytics_client_class] class. You will need an **endpoint**, and either an **API key** or ``TokenCredential`` to instantiate a client object. For more information regarding authenticating with cognitive services, see [Authenticate requests to Azure Cognitive Services][cognitive_auth]. #### Get an API key - You can get the `endpoint` and `API key` from the Cognitive Services resource or Language service resource information in the [Azure Portal][azure_portal]. Alternatively, use the [Azure CLI][azure_cli] snippet below to get the API key from the Language service resource. @@ -89,7 +58,6 @@ az cognitiveservices account keys list --resource-group ` method that returns an `Operation` or a `PageableOperation`. You can use the extension method `WaitForCompletionAsync()` to wait for the operation to complete and obtain its result. A sample code snippet is provided to illustrate using long-running operations [below](#run-multiple-actions-asynchronously). ### Thread safety - We guarantee that all client instance methods are thread-safe and independent of each other ([guideline](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-service-methods-thread-safety)). This ensures that the recommendation of reusing client instances is always safe, even across threads. ### Additional concepts @@ -167,11 +126,9 @@ We guarantee that all client instance methods are thread-safe and independent of ## Examples - The following section provides several code snippets using the `client` [created above](#create-textanalyticsclient-with-azure-active-directory-credential), and covers the main features present in this client library. Although most of the snippets below make use of synchronous service calls, keep in mind that the `Azure.AI.TextAnalytics` package supports both synchronous and asynchronous APIs. ### Sync examples - * [Detect Language](#detect-language) * [Analyze Sentiment](#analyze-sentiment) * [Extract Key Phrases](#extract-key-phrases) @@ -180,14 +137,12 @@ The following section provides several code snippets using the `client` [created * [Recognize Linked Entities](#recognize-linked-entities) ### Async examples - * [Detect Language Asynchronously](#detect-language-asynchronously) * [Recognize Named Entities Asynchronously](#recognize-named-entities-asynchronously) * [Analyze Healthcare Entities Asynchronously](#analyze-healthcare-entities-asynchronously) * [Run multiple actions Asynchronously](#run-multiple-actions-asynchronously) ### Detect Language - Run a predictive model to determine the language that the passed-in document or batch of documents are written in. ```C# Snippet:DetectLanguage @@ -217,7 +172,6 @@ For samples on using the production recommended option `DetectLanguageBatch` see Please refer to the service documentation for a conceptual discussion of [language detection][language_detection]. ### Analyze Sentiment - Run a predictive model to determine the positive, negative, neutral or mixed sentiment contained in the passed-in document or batch of documents. ```C# Snippet:AnalyzeSentiment @@ -250,7 +204,6 @@ To get more granular information about the opinions related to targets of a prod Please refer to the service documentation for a conceptual discussion of [sentiment analysis][sentiment_analysis]. ### Extract Key Phrases - Run a model to identify a collection of significant phrases found in the passed-in document or batch of documents. ```C# Snippet:ExtractKeyPhrases @@ -283,7 +236,6 @@ For samples on using the production recommended option `ExtractKeyPhrasesBatch` Please refer to the service documentation for a conceptual discussion of [key phrase extraction][key_phrase_extraction]. ### Recognize Named Entities - Run a predictive model to identify a collection of named entities in the passed-in document or batch of documents and categorize those entities into categories such as person, location, or organization. For more information on available categories, see [Text Analytics Named Entity Categories][named_entities_categories]. ```C# Snippet:RecognizeEntities @@ -324,7 +276,6 @@ For samples on using the production recommended option `RecognizeEntitiesBatch` Please refer to the service documentation for a conceptual discussion of [named entity recognition][named_entity_recognition]. ### Recognize PII Entities - Run a predictive model to identify a collection of entities containing Personally Identifiable Information found in the passed-in document or batch of documents, and categorize those entities into categories such as US social security number, drivers license number, or credit card number. ```C# Snippet:RecognizePiiEntities @@ -362,7 +313,6 @@ For samples on using the production recommended option `RecognizePiiEntitiesBatc Please refer to the service documentation for supported [PII entity types][pii_entity]. ### Recognize Linked Entities - Run a predictive model to identify a collection of entities found in the passed-in document or batch of documents, and include information linking the entities to their corresponding entries in a well-known knowledge base. ```C# Snippet:RecognizeLinkedEntities @@ -407,7 +357,6 @@ For samples on using the production recommended option `RecognizeLinkedEntitiesB Please refer to the service documentation for a conceptual discussion of [entity linking][entity_linking]. ### Detect Language Asynchronously - Run a predictive model to determine the language that the passed-in document or batch of documents are written in. ```C# Snippet:DetectLanguageAsync @@ -433,7 +382,6 @@ catch (RequestFailedException exception) ``` ### Recognize Named Entities Asynchronously - Run a predictive model to identify a collection of named entities in the passed-in document or batch of documents and categorize those entities into categories such as person, location, or organization. For more information on available categories, see [Text Analytics Named Entity Categories][named_entities_categories]. ```C# Snippet:RecognizeEntitiesAsync @@ -470,7 +418,6 @@ catch (RequestFailedException exception) ``` ### Analyze Healthcare Entities Asynchronously - Text Analytics for health is a containerized service that extracts and labels relevant medical information from unstructured texts such as doctor's notes, discharge summaries, clinical documents, and electronic health records. For more information see [How to: Use Text Analytics for health][healthcare]. ```C# Snippet:TextAnalyticsAnalyzeHealthcareEntitiesConvenienceAsyncAll @@ -608,7 +555,6 @@ await foreach (AnalyzeHealthcareEntitiesResultCollection documentsInPage in heal ``` ### Run multiple actions Asynchronously - This functionality allows running multiple actions in one or more documents. Actions include: * Named Entities Recognition @@ -708,9 +654,7 @@ This functionality allows running multiple actions in one or more documents. Act ``` ## Troubleshooting - ### General - When you interact with the Cognitive Services for Language using the .NET Text Analytics SDK, errors returned by the Language service correspond to the same HTTP status codes returned for REST API requests. For example, if you submit a batch of text document inputs containing duplicate document ids, a `400` error is returned, indicating "Bad Request". @@ -748,7 +692,6 @@ Headers: ``` ### Setting up console logging - The simplest way to see the logs is to enable the console logging. To create an Azure SDK log listener that outputs messages to console use AzureEventSourceListener.CreateConsoleLogger method. @@ -760,7 +703,6 @@ using AzureEventSourceListener listener = AzureEventSourceListener.CreateConsole To learn more about other logging mechanisms see [here][logging]. ## Next steps - Samples showing how to use this client library are available in this GitHub repository. Samples are provided for each main functional area, and for each area, samples are provided for analyzing a single document, and a collection of documents in both sync and async mode. @@ -779,13 +721,11 @@ Samples are provided for each main functional area, and for each area, samples a * [Abstractive Summarization][abstract_summary_sample] ### Advanced samples - * [Analyze Sentiment with Opinion Mining][analyze_sentiment_opinion_mining_sample] * [Run multiple actions][analyze_operation_sample] * [Create a mock client][mock_client_sample] for testing using the [Moq][moq] library. ## Contributing - See the [CONTRIBUTING.md][contributing] for details on building, testing, and contributing to this library. This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit [cla.microsoft.com][cla]. @@ -803,7 +743,6 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con [textanalytics_nuget_package]: https://www.nuget.org/packages/Azure.AI.TextAnalytics [textanalytics_samples]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/textanalytics/Azure.AI.TextAnalytics/samples/README.md [cognitive_resource_portal]: https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account -[cognitive_resource_cli]: https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account-cli [dotnet_lro]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#consuming-long-running-operations-using-operationt [mock_client_sample]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample_MockClient.md @@ -845,6 +784,8 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con [azure_cli]: https://docs.microsoft.com/cli/azure [azure_sub]: https://azure.microsoft.com/free/dotnet/ +[azure_portal_create_ta_resource]: https://portal.azure.com/#create/Microsoft.CognitiveServicesTextAnalytics +[azure_cli_create_ta_resource]: https://learn.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account-cli [nuget]: https://www.nuget.org/ [azure_portal]: https://portal.azure.com [moq]: https://github.com/Moq/moq4/ From 174c27983915a505c0c4c0ac4050ff319ff7b178 Mon Sep 17 00:00:00 2001 From: Jose Arriaga Maldonado Date: Fri, 13 Jan 2023 11:25:30 -0800 Subject: [PATCH 2/3] Update links --- sdk/textanalytics/Azure.AI.TextAnalytics/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/README.md b/sdk/textanalytics/Azure.AI.TextAnalytics/README.md index 96a57b8b8abb2..fbbd3e2791cc4 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/README.md +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/README.md @@ -41,9 +41,9 @@ This table shows the relationship between SDK versions and supported API version * An existing Cognitive Services or Language service resource. #### Create a Cognitive Services resource or a Language service resource -Azure Cognitive Service for Language supports both [multi-service and single-service access][cognitive_resource_portal]. Create a Cognitive Services resource if you plan to access multiple cognitive services under a single endpoint and API key. To access the features of the Language service only, create a Language service resource instead. +Azure Cognitive Service for Language supports both [multi-service and single-service access][service_access]. Create a Cognitive Services resource if you plan to access multiple cognitive services under a single endpoint and API key. To access the features of the Language service only, create a Language service resource instead. -You can create either resource via the [Azure portal][azure_portal_create_ta_resource] or, alternatively, you can follow the steps in [this document][azure_cli_create_ta_resource] to create it using the [Azure CLI][azure_cli]. +You can create either resource via the [Azure portal][create_ta_resource_azure_portal] or, alternatively, you can follow the steps in [this document][create_ta_resource_azure_cli] to create it using the [Azure CLI][azure_cli]. ### Authenticate the client Interaction with the service using the client library begins with creating an instance of the [TextAnalyticsClient][textanalytics_client_class] class. You will need an **endpoint**, and either an **API key** or ``TokenCredential`` to instantiate a client object. For more information regarding authenticating with cognitive services, see [Authenticate requests to Azure Cognitive Services][cognitive_auth]. @@ -742,7 +742,6 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con [textanalytics_refdocs]: https://aka.ms/azsdk-net-textanalytics-ref-docs [textanalytics_nuget_package]: https://www.nuget.org/packages/Azure.AI.TextAnalytics [textanalytics_samples]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/textanalytics/Azure.AI.TextAnalytics/samples/README.md -[cognitive_resource_portal]: https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account [dotnet_lro]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#consuming-long-running-operations-using-operationt [mock_client_sample]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/textanalytics/Azure.AI.TextAnalytics/samples/Sample_MockClient.md @@ -784,8 +783,9 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con [azure_cli]: https://docs.microsoft.com/cli/azure [azure_sub]: https://azure.microsoft.com/free/dotnet/ -[azure_portal_create_ta_resource]: https://portal.azure.com/#create/Microsoft.CognitiveServicesTextAnalytics -[azure_cli_create_ta_resource]: https://learn.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account-cli +[service_access]: https://learn.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account +[create_ta_resource_azure_portal]: https://learn.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account +[create_ta_resource_azure_cli]: https://learn.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account-cli [nuget]: https://www.nuget.org/ [azure_portal]: https://portal.azure.com [moq]: https://github.com/Moq/moq4/ From 58bd820f9bc43d781ccd8e599503fa44c5f33ea7 Mon Sep 17 00:00:00 2001 From: Jose Arriaga Maldonado Date: Fri, 13 Jan 2023 13:29:34 -0800 Subject: [PATCH 3/3] Fix linting warnings --- .../Azure.AI.TextAnalytics/README.md | 63 +++++++++++++++---- 1 file changed, 50 insertions(+), 13 deletions(-) diff --git a/sdk/textanalytics/Azure.AI.TextAnalytics/README.md b/sdk/textanalytics/Azure.AI.TextAnalytics/README.md index fbbd3e2791cc4..7741d6c1be682 100644 --- a/sdk/textanalytics/Azure.AI.TextAnalytics/README.md +++ b/sdk/textanalytics/Azure.AI.TextAnalytics/README.md @@ -1,23 +1,26 @@ # Azure Cognitive Services Text Analytics client library for .NET + Text Analytics is part of the Azure Cognitive Service for Language, a cloud-based service that provides Natural Language Processing (NLP) features for understanding and analyzing text. This client library offers the following features: - * Language detection - * Sentiment analysis - * Key phrase extraction - * Named entity recognition (NER) - * Personally identifiable information (PII) entity recognition - * Entity linking - * Text analytics for health - * Custom named entity recognition (Custom NER) - * Custom text classification - * Dynamic text classification - * Extractive text summarization - * Abstractive text summarization +* Language detection +* Sentiment analysis +* Key phrase extraction +* Named entity recognition (NER) +* Personally identifiable information (PII) entity recognition +* Entity linking +* Text analytics for health +* Custom named entity recognition (Custom NER) +* Custom text classification +* Dynamic text classification +* Extractive text summarization +* Abstractive text summarization [Source code][textanalytics_client_src] | [Package (NuGet)][textanalytics_nuget_package] | [API reference documentation][textanalytics_refdocs] | [Product documentation][language_service_docs] | [Samples][textanalytics_samples] ## Getting started + ### Install the package + Install the Azure Text Analytics client library for .NET with [NuGet][nuget]: ```dotnetcli @@ -37,18 +40,22 @@ This table shows the relationship between SDK versions and supported API version |1.0.X | 3.0 ### Prerequisites + * An [Azure subscription][azure_sub]. * An existing Cognitive Services or Language service resource. #### Create a Cognitive Services resource or a Language service resource + Azure Cognitive Service for Language supports both [multi-service and single-service access][service_access]. Create a Cognitive Services resource if you plan to access multiple cognitive services under a single endpoint and API key. To access the features of the Language service only, create a Language service resource instead. You can create either resource via the [Azure portal][create_ta_resource_azure_portal] or, alternatively, you can follow the steps in [this document][create_ta_resource_azure_cli] to create it using the [Azure CLI][azure_cli]. ### Authenticate the client + Interaction with the service using the client library begins with creating an instance of the [TextAnalyticsClient][textanalytics_client_class] class. You will need an **endpoint**, and either an **API key** or ``TokenCredential`` to instantiate a client object. For more information regarding authenticating with cognitive services, see [Authenticate requests to Azure Cognitive Services][cognitive_auth]. #### Get an API key + You can get the `endpoint` and `API key` from the Cognitive Services resource or Language service resource information in the [Azure Portal][azure_portal]. Alternatively, use the [Azure CLI][azure_cli] snippet below to get the API key from the Language service resource. @@ -58,6 +65,7 @@ az cognitiveservices account keys list --resource-group ` method that returns an `Operation` or a `PageableOperation`. You can use the extension method `WaitForCompletionAsync()` to wait for the operation to complete and obtain its result. A sample code snippet is provided to illustrate using long-running operations [below](#run-multiple-actions-asynchronously). ### Thread safety + We guarantee that all client instance methods are thread-safe and independent of each other ([guideline](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-service-methods-thread-safety)). This ensures that the recommendation of reusing client instances is always safe, even across threads. ### Additional concepts + [Client options](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#configuring-service-clients-using-clientoptions) | [Accessing the response](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#accessing-http-response-details-using-responset) | @@ -126,9 +144,11 @@ We guarantee that all client instance methods are thread-safe and independent of ## Examples -The following section provides several code snippets using the `client` [created above](#create-textanalyticsclient-with-azure-active-directory-credential), and covers the main features present in this client library. Although most of the snippets below make use of synchronous service calls, keep in mind that the `Azure.AI.TextAnalytics` package supports both synchronous and asynchronous APIs. + +The following section provides several code snippets using the `client` [created above](#create-a-textanalyticsclient-using-an-api-key-credential), and covers the main features present in this client library. Although most of the snippets below make use of synchronous service calls, keep in mind that the `Azure.AI.TextAnalytics` package supports both synchronous and asynchronous APIs. ### Sync examples + * [Detect Language](#detect-language) * [Analyze Sentiment](#analyze-sentiment) * [Extract Key Phrases](#extract-key-phrases) @@ -137,12 +157,14 @@ The following section provides several code snippets using the `client` [created * [Recognize Linked Entities](#recognize-linked-entities) ### Async examples + * [Detect Language Asynchronously](#detect-language-asynchronously) * [Recognize Named Entities Asynchronously](#recognize-named-entities-asynchronously) * [Analyze Healthcare Entities Asynchronously](#analyze-healthcare-entities-asynchronously) * [Run multiple actions Asynchronously](#run-multiple-actions-asynchronously) ### Detect Language + Run a predictive model to determine the language that the passed-in document or batch of documents are written in. ```C# Snippet:DetectLanguage @@ -172,6 +194,7 @@ For samples on using the production recommended option `DetectLanguageBatch` see Please refer to the service documentation for a conceptual discussion of [language detection][language_detection]. ### Analyze Sentiment + Run a predictive model to determine the positive, negative, neutral or mixed sentiment contained in the passed-in document or batch of documents. ```C# Snippet:AnalyzeSentiment @@ -204,6 +227,7 @@ To get more granular information about the opinions related to targets of a prod Please refer to the service documentation for a conceptual discussion of [sentiment analysis][sentiment_analysis]. ### Extract Key Phrases + Run a model to identify a collection of significant phrases found in the passed-in document or batch of documents. ```C# Snippet:ExtractKeyPhrases @@ -236,6 +260,7 @@ For samples on using the production recommended option `ExtractKeyPhrasesBatch` Please refer to the service documentation for a conceptual discussion of [key phrase extraction][key_phrase_extraction]. ### Recognize Named Entities + Run a predictive model to identify a collection of named entities in the passed-in document or batch of documents and categorize those entities into categories such as person, location, or organization. For more information on available categories, see [Text Analytics Named Entity Categories][named_entities_categories]. ```C# Snippet:RecognizeEntities @@ -276,6 +301,7 @@ For samples on using the production recommended option `RecognizeEntitiesBatch` Please refer to the service documentation for a conceptual discussion of [named entity recognition][named_entity_recognition]. ### Recognize PII Entities + Run a predictive model to identify a collection of entities containing Personally Identifiable Information found in the passed-in document or batch of documents, and categorize those entities into categories such as US social security number, drivers license number, or credit card number. ```C# Snippet:RecognizePiiEntities @@ -313,6 +339,7 @@ For samples on using the production recommended option `RecognizePiiEntitiesBatc Please refer to the service documentation for supported [PII entity types][pii_entity]. ### Recognize Linked Entities + Run a predictive model to identify a collection of entities found in the passed-in document or batch of documents, and include information linking the entities to their corresponding entries in a well-known knowledge base. ```C# Snippet:RecognizeLinkedEntities @@ -357,6 +384,7 @@ For samples on using the production recommended option `RecognizeLinkedEntitiesB Please refer to the service documentation for a conceptual discussion of [entity linking][entity_linking]. ### Detect Language Asynchronously + Run a predictive model to determine the language that the passed-in document or batch of documents are written in. ```C# Snippet:DetectLanguageAsync @@ -382,6 +410,7 @@ catch (RequestFailedException exception) ``` ### Recognize Named Entities Asynchronously + Run a predictive model to identify a collection of named entities in the passed-in document or batch of documents and categorize those entities into categories such as person, location, or organization. For more information on available categories, see [Text Analytics Named Entity Categories][named_entities_categories]. ```C# Snippet:RecognizeEntitiesAsync @@ -418,6 +447,7 @@ catch (RequestFailedException exception) ``` ### Analyze Healthcare Entities Asynchronously + Text Analytics for health is a containerized service that extracts and labels relevant medical information from unstructured texts such as doctor's notes, discharge summaries, clinical documents, and electronic health records. For more information see [How to: Use Text Analytics for health][healthcare]. ```C# Snippet:TextAnalyticsAnalyzeHealthcareEntitiesConvenienceAsyncAll @@ -555,6 +585,7 @@ await foreach (AnalyzeHealthcareEntitiesResultCollection documentsInPage in heal ``` ### Run multiple actions Asynchronously + This functionality allows running multiple actions in one or more documents. Actions include: * Named Entities Recognition @@ -654,7 +685,9 @@ This functionality allows running multiple actions in one or more documents. Act ``` ## Troubleshooting + ### General + When you interact with the Cognitive Services for Language using the .NET Text Analytics SDK, errors returned by the Language service correspond to the same HTTP status codes returned for REST API requests. For example, if you submit a batch of text document inputs containing duplicate document ids, a `400` error is returned, indicating "Bad Request". @@ -692,6 +725,7 @@ Headers: ``` ### Setting up console logging + The simplest way to see the logs is to enable the console logging. To create an Azure SDK log listener that outputs messages to console use AzureEventSourceListener.CreateConsoleLogger method. @@ -703,6 +737,7 @@ using AzureEventSourceListener listener = AzureEventSourceListener.CreateConsole To learn more about other logging mechanisms see [here][logging]. ## Next steps + Samples showing how to use this client library are available in this GitHub repository. Samples are provided for each main functional area, and for each area, samples are provided for analyzing a single document, and a collection of documents in both sync and async mode. @@ -721,11 +756,13 @@ Samples are provided for each main functional area, and for each area, samples a * [Abstractive Summarization][abstract_summary_sample] ### Advanced samples + * [Analyze Sentiment with Opinion Mining][analyze_sentiment_opinion_mining_sample] * [Run multiple actions][analyze_operation_sample] * [Create a mock client][mock_client_sample] for testing using the [Moq][moq] library. ## Contributing + See the [CONTRIBUTING.md][contributing] for details on building, testing, and contributing to this library. This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit [cla.microsoft.com][cla].