You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Migrate to the latest version of Azure Cognitive Service for Language
17
17
18
18
> [!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.
20
20
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.
22
22
23
-
## Features
23
+
## Unified Language endpoint (REST API)
24
24
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:
> * 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:
*[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)
34
40
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:
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:
40
48
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
+
```
42
66
43
-
See the reference documentation for examples of the JSON response.
Use the quickstarts linked above to see current example REST API calls for the feature(s) you're using, and the associated API output.
47
68
48
-
###Client libraries
69
+
## Client libraries
49
70
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.
> *[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
64
77
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.
66
79
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
68
81
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.
70
83
71
-
### REST API
84
+
### NER, PII, and entity linking v2.1
72
85
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:
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).
80
87
81
88
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).
82
89
83
-
See the reference documentation for examples of the JSON response.
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.
The following table lists the entity categories returned for NER v2.1.
97
93
@@ -120,62 +116,28 @@ The following table lists the entity categories returned for NER v2.1.
120
116
| Dimension | Dimensions and measurements. |
121
117
| Temperature | Temperatures. |
122
118
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.
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.
145
122
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.
> * 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.
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.
0 commit comments