Skip to content

Commit 775b66d

Browse files
authored
Merge pull request #204636 from aahill/migration-guide
updating migration guide
2 parents d8104af + 802a527 commit 775b66d

File tree

1 file changed

+68
-106
lines changed

1 file changed

+68
-106
lines changed

articles/cognitive-services/language-service/concepts/migrate-language-service-latest.md

Lines changed: 68 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -8,90 +8,86 @@ manager: nitinme
88
ms.service: cognitive-services
99
ms.subservice: language-service
1010
ms.topic: article
11-
ms.date: 01/10/2022
11+
ms.date: 07/13/2022
1212
ms.author: aahi
1313
ms.custom: ignite-fall-2021
1414
---
1515

1616
# Migrate to the latest version of Azure Cognitive Service for Language
1717

1818
> [!TIP]
19-
> Just getting started with Azure Cognitive Service for Language? See the [overview article](../overview.md) for details on the service, available features, and links to quickstarts for sending your first API requests.
19+
> Just getting started with Azure Cognitive Service for Language? See the [overview article](../overview.md) for details on the service, available features, and links to quickstarts for information on the current version of the API.
2020
21-
If your applications are using an older version of the Text Analytics API (before v3.1), or client library (before stable v5.1.0), this article will help you upgrade your applications to use the latest version of the [Azure Cognitive Service for language](../overview.md) features.
21+
If your applications are still using the Text Analytics API, or client library (before stable v5.1.0), this article will help you upgrade your applications to use the latest version of the [Azure Cognitive Service for language](../overview.md) features.
2222

23-
## Features
23+
## Unified Language endpoint (REST API)
2424

25-
Select one of the features below to see information you can use to update your application.
25+
This section applies to applications that use the older `/text/analytics/...` endpoint format for REST API calls. For example:
2626

27-
## [Sentiment analysis](#tab/sentiment-analysis)
27+
```http
28+
https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/<version>/<feature>
29+
```
2830

29-
> [!NOTE]
30-
> * Want to use the latest version of the API in your application? See the [sentiment analysis](../sentiment-opinion-mining/how-to/call-api.md) how-to article and [quickstart](../sentiment-opinion-mining/quickstart.md) for information on the current version of the API.
31-
> * The version `3.1-preview.x` REST API endpoints and `5.1.0-beta.x` client library has been deprecated.
31+
If your application uses the above endpoint format, the REST API endpoint for the following Language service features has changed:
3232

33-
## Feature changes from version 2.1
33+
* [Entity linking](../entity-linking/quickstart.md?pivots=rest-api)
34+
* [Key phrase extraction](../key-phrase-extraction/quickstart.md?pivots=rest-api)
35+
* [Language detection](../language-detection/quickstart.md?pivots=rest-api)
36+
* [Named entity recognition (NER)](../named-entity-recognition/quickstart.md?pivots=rest-api)
37+
* [Personally Identifying Information (PII) detection](../personally-identifiable-information/quickstart.md?pivots=rest-api)
38+
* [Sentiment analysis and opinion mining](../sentiment-opinion-mining/quickstart.md?pivots=rest-api)
39+
* [Text analytics for health](../text-analytics-for-health/quickstart.md?pivots=rest-api)
3440

35-
Sentiment Analysis in version 2.1 returns sentiment scores between 0 and 1 for each document sent to the API, with scores closer to 1 indicating more positive sentiment. The current version of this feature returns sentiment labels (such as "positive" or "negative") for both the sentences and the document as a whole, and their associated confidence scores.
41+
The Language service now provides a unified endpoint for sending REST API requests to these features. If your application uses the REST API, update its request endpoint to use the current endpoint:
3642

37-
## Migrate to the current version
43+
```http
44+
https://<your-language-resource-endpoint>/language/:analyze-text?api-version=2022-05-01
45+
```
3846

39-
### REST API
47+
Additionally, the format of the JSON request body has changed. You'll need to update the request structure that your application sends to the API, for example the following entity recognition JSON body:
4048

41-
If your application uses the REST API, update its request endpoint to use the [current endpoint](../sentiment-opinion-mining/quickstart.md?pivots=rest-api) for sentiment analysis. For example:`https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v3.1/sentiment`. You will also need to update the application to use the sentiment labels returned in the [API's response](../sentiment-opinion-mining/how-to/call-api.md).
49+
```json
50+
{
51+
"kind": "EntityRecognition",
52+
"parameters": {
53+
"modelVersion": "latest"
54+
},
55+
"analysisInput":{
56+
"documents":[
57+
{
58+
"id":"1",
59+
"language": "en",
60+
"text": "I had a wonderful trip to Seattle last week."
61+
}
62+
]
63+
}
64+
}
65+
```
4266

43-
See the reference documentation for examples of the JSON response.
44-
* [Version 2.1](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v2-1/operations/56f30ceeeda5650db055a3c9)
45-
* [Version 3.0](https://westus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-0/operations/Sentiment)
46-
* [Version 3.1](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-1/operations/Sentiment)
67+
Use the quickstarts linked above to see current example REST API calls for the feature(s) you're using, and the associated API output.
4768

48-
### Client libraries
69+
## Client libraries
4970

50-
To use the latest version of the sentiment analysis client library, you will need to download the latest software package in the `Azure.AI.TextAnalytics` namespace. The [quickstart article](../sentiment-opinion-mining/quickstart.md) lists the commands you can use for your preferred language, with example code.
71+
To use the latest version of the client library, you will need to download the latest software package in the `Azure.AI.TextAnalytics` namespace. See the quickstart articles linked above for example code and instructions for using the client library in your preferred language.
5172

52-
[!INCLUDE [SDK target versions](../includes/sdk-target-versions.md)]
73+
<!--[!INCLUDE [SDK target versions](../includes/sdk-target-versions.md)]-->
5374

54-
## [NER, PII, and entity linking](#tab/named-entity-recognition)
5575

56-
> [!NOTE]
57-
> Want to use the latest version of the API in your application? See the following articles for information on the current version of the APIs:
58-
>
59-
> * [NER quickstart](../named-entity-recognition/quickstart.md)
60-
> * [Entity linking quickstart](../entity-linking/quickstart.md)
61-
> * [Personally Identifying Information (PII) detection quickstart](../personally-identifiable-information/quickstart.md)
62-
>
63-
> The version `3.1-preview.x` REST API endpoints and `5.1.0-beta.x` client libraries has been deprecated.
76+
## Version 2.1 functionality changes
6477

65-
## Feature changes from version 2.1
78+
If you're migrating an application from v2.1 of the API, there are several changes to feature functionality you should be aware of.
6679

67-
In version 2.1, the Text Analytics API uses one endpoint for Named Entity Recognition (NER) and entity linking. The current version of this feature provides expanded named entity detection, and uses separate endpoints for NER and entity linking requests. Additionally, you can use another feature offered in the Language service that lets you detect [detect personal (pii) and health (phi) information](../personally-identifiable-information/overview.md).
80+
### Sentiment analysis v2.1
6881

69-
## Migrate to the current version
82+
[Sentiment Analysis](../sentiment-opinion-mining/quickstart.md) in version 2.1 returns sentiment scores between 0 and 1 for each document sent to the API, with scores closer to 1 indicating more positive sentiment. The current version of this feature returns sentiment labels (such as "positive" or "negative") for both the sentences and the document as a whole, and their associated confidence scores.
7083

71-
### REST API
84+
### NER, PII, and entity linking v2.1
7285

73-
If your application uses the REST API, update its request endpoint to the [current endpoints](../named-entity-recognition/quickstart.md?pivots=rest-api) for NER and/or entity linking. For example:
74-
75-
Entity Linking
76-
* `https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v3.1/entities/linking`
77-
78-
NER
79-
* `https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v3.1/entities/recognition/general`
86+
In version 2.1, the Text Analytics API used one endpoint for Named Entity Recognition (NER) and entity linking. The current version of this feature provides expanded named entity detection, and has separate endpoints for [NER](../named-entity-recognition/quickstart.md?pivots=rest-api) and [entity linking](../entity-linking/quickstart.md?pivots=rest-api) requests. Additionally, you can use another feature offered in the Language service that lets you detect [detect personal (PII) and health (PHI) information](../personally-identifiable-information/overview.md).
8087

8188
You will also need to update your application to use the [entity categories](../named-entity-recognition/concepts/named-entity-categories.md) returned in the [API's response](../named-entity-recognition/how-to-call.md).
8289

83-
See the reference documentation for examples of the JSON response.
84-
* [Version 2.1](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v2-1/operations/5ac4251d5b4ccd1554da7634)
85-
* [Version 3.0](https://westus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-0/operations/EntitiesRecognitionGeneral)
86-
* [Version 3.1](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-1/operations/EntitiesRecognitionGeneral)
87-
88-
### Client libraries
89-
90-
To use the latest version of the NER and entity linking client libraries, you will need to download the latest software package in the `Azure.AI.TextAnalytics` namespace. The quickstart article for [Named Entity Recognition](../named-entity-recognition/quickstart.md) and [entity linking](../entity-linking/quickstart.md) lists the commands you can use for your preferred language, with example code.
91-
92-
[!INCLUDE [SDK target versions](../includes/sdk-target-versions.md)]
93-
94-
#### Version 2.1 entity categories
90+
### Version 2.1 entity categories
9591

9692
The following table lists the entity categories returned for NER v2.1.
9793

@@ -120,62 +116,28 @@ The following table lists the entity categories returned for NER v2.1.
120116
| Dimension | Dimensions and measurements. |
121117
| Temperature | Temperatures. |
122118

123-
## [Language detection](#tab/language-detection)
124-
125-
> [!NOTE]
126-
> * Want to use the latest version of the API in your application? See the [language detection](../language-detection/how-to/call-api.md) how-to article and [quickstart](../language-detection/quickstart.md) for information on the current version of the API.
127-
> * The version `3.1-preview.x` REST API endpoints and `5.1.0-beta.x` client libraries has been deprecated.
128-
129-
## Feature changes from version 2.1
130-
131-
The language detection feature output has changed in the current version. The JSON response will contain `ConfidenceScore` instead of `score`. The current version also only returns one language in a `detectedLanguage` attribute for each document.
132-
133-
## Migrate to the current version
134-
135-
### REST API
136-
137-
If your application uses the REST API, update its request endpoint to the [current endpoint](../language-detection/quickstart.md?pivots=rest-api) for language detection. For example:`https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v3.1/languages`. You will also need to update the application to use `ConfidenceScore` instead of `score` in the [API's response](../language-detection/how-to/call-api.md).
138-
139-
See the reference documentation for examples of the JSON response.
140-
* [Version 2.1](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v2-1/operations/56f30ceeeda5650db055a3c7)
141-
* [Version 3.0](https://westus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-0/operations/Languages)
142-
* [Version 3.1](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-1/operations/Languages)
119+
### Language detection v2.1
143120

144-
#### Client libraries
121+
The [language detection](../language-detection/quickstart.md) feature output has changed in the current version. The JSON response will contain `ConfidenceScore` instead of `score`. The current version also only returns one language for each document.
145122

146-
To use the latest version of the sentiment analysis client library, you will need to download the latest software package in the `Azure.AI.TextAnalytics` namespace. The [quickstart article](../language-detection/quickstart.md) lists the commands you can use for your preferred language, with example code.
123+
### Key phrase extraction v2.1
147124

148-
[!INCLUDE [SDK target versions](../includes/sdk-target-versions.md)]
149-
150-
## [Key phrase extraction](#tab/key-phrase-extraction)
151-
152-
> [!NOTE]
153-
> * Want to use the latest version of the API in your application? See the [key phrase extraction](../key-phrase-extraction/how-to/call-api.md) how-to article and [quickstart](../key-phrase-extraction/quickstart.md) for information on the current version of the API.
154-
> * The version `3.1-preview.x` REST API endpoints and `5.1.0-beta.x` client library has been deprecated.
155-
156-
## Feature changes from version 2.1
157-
158-
The key phrase extraction feature currently has not changed outside of the endpoint version.
159-
160-
## Migrate to the current version
161-
162-
### REST API
163-
164-
If your application uses the REST API, update its request endpoint to the [current endpoint](../key-phrase-extraction/quickstart.md?pivots=rest-api) for key phrase extraction. For example: `https://<your-custom-subdomain>.api.cognitiveservices.azure.com/text/analytics/v3.1/keyPhrases`
165-
166-
See the reference documentation for examples of the JSON response.
167-
* [Version 2.1](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v2-1/operations/56f30ceeeda5650db055a3c6)
168-
* [Version 3.0](https://westus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-0/operations/KeyPhrases)
169-
* [Version 3.1](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-1/operations/KeyPhrases)
170-
171-
### Client libraries
172-
173-
To use the latest version of the sentiment analysis client library, you will need to download the latest software package in the `Azure.AI.TextAnalytics` namespace. The [quickstart article](../key-phrase-extraction/quickstart.md) lists the commands you can use for your preferred language, with example code.
174-
175-
[!INCLUDE [SDK target versions](../includes/sdk-target-versions.md)]
176-
177-
---
125+
The key phrase extraction feature functionality currently has not changed outside of the endpoint and request format.
178126

179127
## See also
180128

181-
* [What is Azure Cognitive Service for language?](../overview.md)
129+
* [What is Azure Cognitive Service for Language?](../overview.md)
130+
* [Language service developer guide](developer-guide.md)
131+
* See the following reference documentation for information on previous API versions.
132+
* [Version 2.1](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v2-1/operations/56f30ceeeda5650db055a3c9)
133+
* [Version 3.0](https://westus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-0/operations/Sentiment)
134+
* [Version 3.1](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-1/operations/Sentiment)
135+
* Use the following quickstart guides to see examples for the current version of these features.
136+
* [Entity linking](../entity-linking/quickstart.md)
137+
* [Key phrase extraction](../key-phrase-extraction/quickstart.md)
138+
* [Named entity recognition (NER)](../named-entity-recognition/quickstart.md)
139+
* [Language detection](../language-detection/quickstart.md)
140+
* [Personally Identifying Information (PII) detection](../personally-identifiable-information/quickstart.md)
141+
* [Sentiment analysis and opinion mining](../sentiment-opinion-mining/quickstart.md)
142+
* [Text analytics for health](../text-analytics-for-health/quickstart.md)
143+

0 commit comments

Comments
 (0)