Skip to content

Commit 74649f6

Browse files
authored
Merge pull request #177453 from aahill/rec-article
updating language service files
2 parents 6d6f973 + 63d1bdb commit 74649f6

27 files changed

+219
-140
lines changed

.openpublishing.redirection.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7245,7 +7245,7 @@
72457245
},
72467246
{
72477247
"source_path_from_root": "/articles/cognitive-services/text-analytics/migration-guide.md",
7248-
"redirect_url": "/azure/cognitive-services/language-service/concepts/migrate",
7248+
"redirect_url": "/azure/cognitive-services/language-service/concepts/migrate-from-text-analytics-v2",
72497249
"redirect_document_id": true
72507250
},
72517251
{
Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
---
2+
title: Migration guide for v2 of the Text Analytics API
3+
titleSuffix: Azure Cognitive Services
4+
description: Learn how to move your applications to use version 3 of the Text Analytics API.
5+
services: cognitive-services
6+
author: aahill
7+
manager: nitinme
8+
ms.service: cognitive-services
9+
ms.subservice: text-analytics
10+
ms.topic: article
11+
ms.date: 07/06/2021
12+
ms.author: aahi
13+
---
14+
15+
# Migrate from version 2 of the Text Analytics API
16+
17+
If your applications are using version 2.1 of the Text Analytics API, this article will help you upgrade your applications to use the latest version of the features, which are now a part of [Azure Cognitive Service for language](../overview.md).
18+
19+
## Features
20+
21+
Select one of the features below to see information you can use to update your application.
22+
23+
## [Sentiment analysis](#tab/sentiment-analysis)
24+
25+
> [!TIP]
26+
> 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.
27+
28+
## Feature changes
29+
30+
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.
31+
32+
## Steps to migrate
33+
34+
### REST API
35+
36+
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).
37+
38+
See the reference documentation for examples of the JSON response.
39+
* [Version 2.1](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v2-1/operations/56f30ceeeda5650db055a3c9)
40+
* [Version 3.0](https://westus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-0/operations/Sentiment)
41+
* [Version 3.1](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-1/operations/Sentiment)
42+
43+
### Client libraries
44+
45+
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.
46+
47+
## [NER and entity linking](#tab/named-entity-recognition)
48+
49+
> [!TIP]
50+
> 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:
51+
> NER:
52+
> * [Quickstart](../named-entity-recognition/quickstart.md)
53+
> * [how to call the API](../named-entity-recognition/how-to-call.md)
54+
> Entity linking
55+
> * [Quickstart](../entity-linking/quickstart.md)
56+
> * [how to call the API](../entity-linking/how-to/call-api.md)
57+
58+
## Feature changes
59+
60+
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).
61+
62+
## Steps to migrate
63+
64+
### REST API
65+
66+
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:
67+
68+
Entity Linking
69+
* `https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v3.1/entities/linking`
70+
71+
NER
72+
* `https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v3.1/entities/recognition/general`
73+
74+
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).
75+
76+
See the reference documentation for examples of the JSON response.
77+
* [Version 2.1](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v2-1/operations/5ac4251d5b4ccd1554da7634)
78+
* [Version 3.0](https://westus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-0/operations/EntitiesRecognitionGeneral)
79+
* [Version 3.1](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-1/operations/EntitiesRecognitionGeneral)
80+
81+
### Client libraries
82+
83+
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.
84+
85+
#### Version 2.1 entity categories
86+
87+
The following table lists the entity categories returned for NER v2.1.
88+
89+
| Category | Description |
90+
|------------|--------------------------------------|
91+
| Person | Names of people. |
92+
|Location | Natural and human-made landmarks, structures, geographical features, and geopolitical entities |
93+
|Organization | Companies, political groups, musical bands, sport clubs, government bodies, and public organizations. Nationalities and religions are not included in this entity type. |
94+
| PhoneNumber | Phone numbers (US and EU phone numbers only). |
95+
| Email | Email addresses. |
96+
| URL | URLs to websites. |
97+
| IP | Network IP addresses. |
98+
| DateTime | Dates and times of day.|
99+
| Date | Calender dates. |
100+
| Time | Times of day |
101+
| DateRange | Date ranges. |
102+
| TimeRange | Time ranges. |
103+
| Duration | Durations. |
104+
| Set | Set, repeated times. |
105+
| Quantity | Numbers and numeric quantities. |
106+
| Number | Numbers. |
107+
| Percentage | Percentages.|
108+
| Ordinal | Ordinal numbers. |
109+
| Age | Ages. |
110+
| Currency | Currencies. |
111+
| Dimension | Dimensions and measurements. |
112+
| Temperature | Temperatures. |
113+
114+
## [Language detection](#tab/language-detection)
115+
116+
> [!TIP]
117+
> 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.
118+
119+
## Feature changes
120+
121+
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.
122+
123+
## Steps to migrate
124+
125+
### REST API
126+
127+
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).
128+
129+
See the reference documentation for examples of the JSON response.
130+
* [Version 2.1](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v2-1/operations/56f30ceeeda5650db055a3c7)
131+
* [Version 3.0](https://westus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-0/operations/Languages)
132+
* [Version 3.1](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-1/operations/Languages)
133+
134+
#### Client libraries
135+
136+
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.
137+
138+
## [Key phrase extraction](#tab/key-phrase-extraction)
139+
140+
> [!TIP]
141+
> 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.
142+
143+
## Feature changes
144+
145+
The key phrase extraction feature currently has not changed outside of the endpoint version.
146+
147+
## Steps to migrate
148+
149+
### REST API
150+
151+
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`
152+
153+
See the reference documentation for examples of the JSON response.
154+
* [Version 2.1](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v2-1/operations/56f30ceeeda5650db055a3c6)
155+
* [Version 3.0](https://westus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-0/operations/KeyPhrases)
156+
* [Version 3.1](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-1/operations/KeyPhrases)
157+
158+
### Client libraries
159+
160+
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.
161+
162+
---
163+
164+
## See also
165+
166+
* [What is Azure Cognitive Service for language?](../overview.md)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ On November 2nd 2021, Azure Cognitive Service for Language was released into pub
1717

1818
## Do I need to migrate to the language service if I am using Text Analytics?
1919

20-
Text Analytics has been incorporated into the language service, and its features are still available. If you were using Text Analytics, your applications should continue to work without breaking changes.
20+
Text Analytics has been incorporated into the language service, and its features are still available. If you were using Text Analytics, your applications should continue to work without breaking changes. You can also see the [Text Analytics v2 migration guide](migrate-from-text-analytics-v2.md), if you need to update an older application.
2121

2222
Consider using one of the available quickstart articles to see the latest information on service endpoints, and API calls.
2323

articles/cognitive-services/language-service/custom-classification/definitions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Learn about definitions used in custom text classification.
2020
## Project
2121

2222
A project is a work area for building your custom AI models based on your data. Your project can only be accessed by you and others who have contributor access to the Azure resource being used.
23-
As a prerequisite to creating a Custom text classification project, you have to [connect your resource to a storage account](how-to/project-requirements.md).
23+
As a prerequisite to creating a Custom text classification project, you have to [connect your resource to a storage account](how-to/create-project.md).
2424
As part of the project creation flow, you need connect it to a blob container where you have uploaded your dataset. Your project automatically includes all the `.txt` files available in your container. You can have multiple models within your project all built on the same dataset. See the [service limits](concepts/data-limits.md) article for more information.
2525

2626
Within your project you can do the following operations:

articles/cognitive-services/language-service/custom-classification/faq.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ ms.custom: language-service-custom-classification
1818

1919
Find answers to commonly asked questions about concepts, and scenarios related to custom text classification in Azure Cognitive Service for Language.
2020

21-
## What are the best practices when building a custom classification model?
22-
23-
Get started with this [quickstart](quickstart.md) and follow the [recommended practices](concepts/recommended-practices.md).
24-
2521
## How many tagged files are needed?
2622

2723
Generally, diverse and representative [tagged data](how-to/tag-data.md) leads to better results, given that the tagging is done precisely, consistently and completely. There is no set number of tagged classes that will make every model perform well. Performance highly dependent on your schema, and the ambiguity of your schema. Ambiguous classes need more tags. Performance also depends on the quality of your tagging. The recommended number of tagged instances per entity is 50.
@@ -56,4 +52,5 @@ To clone your project you need to [export]() project assests and then [import]()
5652

5753
## Next steps
5854

59-
[Recommended practices](concepts/recommended-practices.md)
55+
* [Custom text classification overview](overview.md)
56+
* [quickstart](quickstart.md)

articles/cognitive-services/language-service/custom-classification/how-to/call-api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ After you're satisfied with your model, and made any necessary improvements, you
1919

2020
## Prerequisites
2121

22-
* [A custom classification project](project-requirements.md) with a configured Azure blob storage account,
23-
* Text data that has [been uploaded](project-requirements.md#prepare-training-data) to your storage account.
22+
* [A custom classification project](create-project.md) with a configured Azure blob storage account,
23+
* Text data that has [been uploaded](create-project.md#prepare-training-data) to your storage account.
2424
* [Tagged data](tag-data.md) and successfully [trained model](train-model.md)
2525
* Reviewed the [model evaluation details](view-model-evaluation.md) to determine how your model is performing.
2626
* (optional) [Made improvements](improve-model.md) to your model if its performance isn't satisfactory.
@@ -63,7 +63,7 @@ See the [application development lifecycle](../overview.md#application-developme
6363

6464
5. In the response header you receive extract `jobId` from `operation-location`, which has the format: `{YOUR-ENDPOINT}/text/analytics/v3.2-preview.2/analyze/jobs/<jobId}>`
6565

66-
6. Copy the retrieve request and replace `<OPERATION-ID>` with `jobId` recieved form last step and submit the request.
66+
6. Copy the retrieve request and replace `<OPERATION-ID>` with `jobId` received form last step and submit the request.
6767

6868
:::image type="content" source="../media/get-prediction-url-3.png" alt-text="run-inference-3" lightbox="../media/get-prediction-url-3.png":::
6969

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Before you start using custom text classification, you will need several things:
2424
* An Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services).
2525
* An Azure Language resource
2626
* An Azure storage account to store data for your project
27-
* You should have an idea of the [project schema](../concepts/recommended-practices.md) you will use for your data.
27+
* You should have an idea of the [project schema](design-schema.md) you will use for your data.
2828

2929
## Azure resources
3030

@@ -138,7 +138,7 @@ To set proper roles on your storage account:
138138
* You can either upload tagged data, or you can tag your data in Language Studio. Tagged data must follow the [tags file format](../concepts/data-formats.md).
139139

140140
>[!TIP]
141-
> Review the [recommended practices](..//concepts/recommended-practices.md) for data selection and preparation.
141+
> See [How to design a schema](design-schema.md) for information on data selection and preparation.
142142
143143
## Create a project
144144

@@ -150,5 +150,3 @@ Once your Azure resource and storage account are configured, you can create a pr
150150
## Next steps
151151

152152
After your project is created, you can start [tagging your data](tag-data.md), which will inform your text classification model how to interpret text, and is used for training and evaluation.
153-
154-
As you work with your text classification project, review the [recommended practices](../concepts/recommended-practices.md).
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: Recommended custom classification practices
2+
title: How to prepare data and define a schema
33
titleSuffix: Azure Cognitive Services
4-
description: Learn about recommended practices when using custom classification.
4+
description: Learn about data selection, preparation, and creating a schema for custom classification projects.
55
services: cognitive-services
66
author: aahill
77
manager: nitinme
@@ -62,5 +62,5 @@ The schema defines the classes that you need your model to classify your text in
6262

6363
## Next steps
6464

65-
If you haven't already, create a custom classification project. If it's your first time using custom classification, consider following the [quickstart](../quickstart.md) to create an example project. You can also see the [project requirements](../how-to/project-requirements.md) for more details on what you need to create a project.
65+
If you haven't already, create a custom classification project. If it's your first time using custom classification, consider following the [quickstart](../quickstart.md) to create an example project. You can also see the [project requirements](../how-to/create-project.md) for more details on what you need to create a project.
6666

articles/cognitive-services/language-service/custom-classification/how-to/improve-model.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ After you've trained your model you reviewed its evaluation details, you can dec
2121

2222
To optionally improve a model, you will need to have:
2323

24-
* [A custom classification project](project-requirements.md) with a configured Azure blob storage account,
25-
* Text data that has [been uploaded](project-requirements.md#prepare-training-data) to your storage account.
24+
* [A custom classification project](create-project.md) with a configured Azure blob storage account,
25+
* Text data that has [been uploaded](create-project.md#prepare-training-data) to your storage account.
2626
* [Tagged data](tag-data.md) to successfully [train a model](train-model.md)
2727
* Reviewed the [model evaluation details](view-model-evaluation.md) to determine how your model is performing.
2828
* Familiarized yourself with the [evaluation metrics](../concepts/evaluation.md) used for evaluation

articles/cognitive-services/language-service/custom-classification/how-to/tag-data.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Before creating a custom text classification model, you need to have tagged data
2020
## Prerequisites
2121

2222
Before you can tag data, you need:
23-
* [A successfully created project](project-requirements.md) with a configured Azure blob storage account,
24-
* Text data that has [been uploaded](project-requirements.md#prepare-training-data) to your storage account.
23+
* [A successfully created project](create-project.md) with a configured Azure blob storage account,
24+
* Text data that has [been uploaded](create-project.md#prepare-training-data) to your storage account.
2525

2626
See the [application development lifecycle](../overview.md#application-development-lifecycle) for more information.
2727

@@ -35,7 +35,7 @@ As you tag your data, keep in mind:
3535

3636
* In general, more tagged data leads to better results, provided the data is tagged accurately.
3737

38-
* Although we recommended having around 50 tagged files per class, there is no fixed number that can guarantee your model will perform the best, because model performance also depends on possible ambiguity in your [schema](../concepts/recommended-practices.md), and the quality of your tagged data.
38+
* Although we recommended having around 50 tagged files per class, there is no fixed number that can guarantee your model will perform the best, because model performance also depends on possible ambiguity in your [schema](design-schema.md), and the quality of your tagged data.
3939

4040
Use the following steps to tag your data
4141

0 commit comments

Comments
 (0)