Skip to content

Commit 13c1152

Browse files
authored
Merge pull request #103801 from aahill/ta-tab-reorg
[CogSvcs] Updating tab locations
2 parents be64d1a + 4c1514c commit 13c1152

File tree

2 files changed

+121
-116
lines changed

2 files changed

+121
-116
lines changed

articles/cognitive-services/text-analytics/how-tos/text-analytics-how-to-entity-linking.md

Lines changed: 80 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ manager: nitinme
99
ms.service: cognitive-services
1010
ms.subservice: text-analytics
1111
ms.topic: article
12-
ms.date: 01/27/2019
12+
ms.date: 02/10/2020
1313
ms.author: aahi
1414
---
1515

@@ -40,7 +40,35 @@ The Text Analytics API offers two versions of Named Entity Recognition - v2 and
4040

4141
See [language support](../language-support.md#sentiment-analysis-key-phrase-extraction-and-named-entity-recognition) for information.
4242

43-
#### [Version 2](#tab/version-2)
43+
44+
#### [Version 3.0-preview](#tab/version-3)
45+
46+
### Entity types
47+
48+
Named Entity Recognition v3 provides expanded detection across multiple types. Currently, NER v3 can recognize the following categories of entities:
49+
50+
* General
51+
* Personal Information
52+
53+
For a detailed list of supported entities and languages, see the [NER v3 supported entity types](../named-entity-types.md) article.
54+
55+
### Request endpoints
56+
57+
Named Entity Recognition v3 uses separate endpoints for NER and entity linking requests. Use a URL format below based on your request:
58+
59+
NER
60+
* General entities - `https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v3.0-preview.1/entities/recognition/general`
61+
62+
* Personal information - `https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v3.0-preview.1/entities/recognition/pii`
63+
64+
Entity linking
65+
* `https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v3.0-preview.1/entities/linking`
66+
67+
### Model versioning
68+
69+
[!INCLUDE [v3-model-versioning](../includes/model-versioning.md)]
70+
71+
#### [Version 2.1](#tab/version-2)
4472

4573
### Entity types
4674

@@ -79,33 +107,6 @@ Named Entity Recognition v2 uses a single endpoint for NER and entity linking re
79107

80108
`https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v2.1/entities`
81109

82-
#### [Version 3 (Public preview)](#tab/version-3)
83-
84-
### Entity types
85-
86-
Named Entity Recognition v3 provides expanded detection across multiple types. Currently, NER v3 can recognize the following categories of entities:
87-
88-
* General
89-
* Personal Information
90-
91-
For a detailed list of supported entities and languages, see the [NER v3 supported entity types](../named-entity-types.md) article.
92-
93-
### Request endpoints
94-
95-
Named Entity Recognition v3 uses separate endpoints for NER and entity linking requests. Use a URL format below based on your request:
96-
97-
NER
98-
* General entities - `https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v3.0-preview.1/entities/recognition/general`
99-
100-
* Personal information - `https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v3.0-preview.1/entities/recognition/pii`
101-
102-
Entity linking
103-
* `https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v3.0-preview.1/entities/linking`
104-
105-
### Model versioning
106-
107-
[!INCLUDE [v3-model-versioning](../includes/model-versioning.md)]
108-
109110
---
110111

111112
## Sending a REST API request
@@ -114,23 +115,16 @@ Entity linking
114115

115116
You must have JSON documents in this format: ID, text, language.
116117

117-
Each document must must be under 5,120 characters, and you can have up to 1,000 items (IDs) per collection. The collection is submitted in the body of the request.
118+
Each document must be under 5,120 characters, and you can have up to 1,000 items (IDs) per collection. The collection is submitted in the body of the request.
118119

119120
### Structure the request
120121

121122
Create a POST request. You can [use Postman](text-analytics-how-to-call-api.md) or the **API testing console** in the following links to quickly structure and send one.
122123

123-
[!INCLUDE [text-analytics-find-resource-information](../includes/find-azure-resource-info.md)]
124-
125-
#### [Version 2](#tab/version-2)
126-
127-
[Named Entity Recognition (NER) v2 reference](https://eastus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v2-1/operations/5ac4251d5b4ccd1554da7634)
128-
129-
Version 2 uses the following endpoint for entity linking and NER requests:
130-
131-
`https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v2.1/entities`
124+
> [!NOTE]
125+
> You can find your key and endpoint for your Text Analytics resource on the azure portal. They will be located on the resource's **Quick start** page, under **resource management**.
132126
133-
#### [Version 3](#tab/version-3)
127+
#### [Version 3.0-preview](#tab/version-3)
134128

135129
[Named Entity Recognition v3 reference](https://westus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-0-Preview-1/operations/EntitiesRecognitionGeneral)
136130

@@ -144,6 +138,14 @@ NER
144138
Entity linking
145139
* `https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v3.0-preview.1/entities/linking`
146140

141+
#### [Version 2.1](#tab/version-2)
142+
143+
[Named Entity Recognition (NER) v2 reference](https://eastus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v2-1/operations/5ac4251d5b4ccd1554da7634)
144+
145+
Version 2 uses the following endpoint for entity linking and NER requests:
146+
147+
`https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v2.1/entities`
148+
147149
---
148150

149151
Set a request header to include your Text Analytics API key. In the request body, provide the JSON documents you prepared.
@@ -176,44 +178,8 @@ All POST requests return a JSON formatted response with the IDs and detected ent
176178

177179
Output is returned immediately. You can stream the results to an application that accepts JSON or save the output to a file on the local system, and then import it into an application that allows you to sort, search, and manipulate the data.
178180

179-
#### [Version 2](#tab/version-2)
180181

181-
### Example NER v2 response
182-
```json
183-
{
184-
"documents": [{
185-
"id": "1",
186-
"entities": [{
187-
"name": "Seattle",
188-
"matches": [{
189-
"wikipediaScore": 0.15046201222847677,
190-
"entityTypeScore": 0.80624294281005859,
191-
"text": "Seattle",
192-
"offset": 26,
193-
"length": 7
194-
}],
195-
"wikipediaLanguage": "en",
196-
"wikipediaId": "Seattle",
197-
"wikipediaUrl": "https://en.wikipedia.org/wiki/Seattle",
198-
"bingId": "5fbba6b8-85e1-4d41-9444-d9055436e473",
199-
"type": "Location"
200-
}, {
201-
"name": "last week",
202-
"matches": [{
203-
"entityTypeScore": 0.8,
204-
"text": "last week",
205-
"offset": 34,
206-
"length": 9
207-
}],
208-
"type": "DateTime",
209-
"subType": "DateRange"
210-
}]
211-
}],
212-
"errors": []
213-
}
214-
```
215-
216-
#### [Version 3 (Public preview)](#tab/version-3)
182+
#### [Version 3.0-preview)](#tab/version-3)
217183

218184
### Example v3 responses
219185

@@ -270,6 +236,43 @@ Version 3 provides separate endpoints for NER and entity linking. The responses
270236
}
271237
```
272238

239+
#### [Version 2.1](#tab/version-2)
240+
241+
### Example NER v2 response
242+
```json
243+
{
244+
"documents": [{
245+
"id": "1",
246+
"entities": [{
247+
"name": "Seattle",
248+
"matches": [{
249+
"wikipediaScore": 0.15046201222847677,
250+
"entityTypeScore": 0.80624294281005859,
251+
"text": "Seattle",
252+
"offset": 26,
253+
"length": 7
254+
}],
255+
"wikipediaLanguage": "en",
256+
"wikipediaId": "Seattle",
257+
"wikipediaUrl": "https://en.wikipedia.org/wiki/Seattle",
258+
"bingId": "5fbba6b8-85e1-4d41-9444-d9055436e473",
259+
"type": "Location"
260+
}, {
261+
"name": "last week",
262+
"matches": [{
263+
"entityTypeScore": 0.8,
264+
"text": "last week",
265+
"offset": 34,
266+
"length": 9
267+
}],
268+
"type": "DateTime",
269+
"subType": "DateRange"
270+
}]
271+
}],
272+
"errors": []
273+
}
274+
```
275+
273276
---
274277

275278
## Summary

articles/cognitive-services/text-analytics/how-tos/text-analytics-how-to-sentiment-analysis.md

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ manager: nitinme
88
ms.service: cognitive-services
99
ms.subservice: text-analytics
1010
ms.topic: sample
11-
ms.date: 12/17/2019
11+
ms.date: 02/10/2020
1212
ms.author: aahi
1313
---
1414

@@ -45,14 +45,7 @@ The Text Analytics API offers two versions of Sentiment Analysis - v2 and v3. Se
4545
| Sentiment labeling | | X |
4646
| Model versioning | | X |
4747

48-
#### [Version 2](#tab/version-2)
49-
50-
### Sentiment scoring
51-
52-
The sentiment analyzer classifies text as predominantly positive or negative. It assigns a score in the range of 0 to 1. Values close to 0.5 are neutral or indeterminate. A score of 0.5 indicates neutrality. When a string can't be analyzed for sentiment or has no sentiment, the score is always 0.5 exactly. For example, if you pass in a Spanish string with an English language code, the score is 0.5.
53-
54-
55-
#### [Version 3 (Public preview)](#tab/version-3)
48+
#### [Version 3.0-preview](#tab/version-3)
5649

5750
### Sentiment scoring
5851

@@ -80,6 +73,13 @@ Sentiment Analysis v3 can return scores and labels at a sentence and document le
8073

8174
You can find an example C# application that calls this version of Sentiment Analysis on [GitHub](https://github.com/Azure-Samples/cognitive-services-REST-api-samples/tree/master/dotnet/Language/SentimentV3.cs).
8275

76+
77+
#### [Version 2.1](#tab/version-2)
78+
79+
### Sentiment scoring
80+
81+
The sentiment analyzer classifies text as predominantly positive or negative. It assigns a score in the range of 0 to 1. Values close to 0.5 are neutral or indeterminate. A score of 0.5 indicates neutrality. When a string can't be analyzed for sentiment or has no sentiment, the score is always 0.5 exactly. For example, if you pass in a Spanish string with an English language code, the score is 0.5.
82+
8383
---
8484

8585
## Sending a REST API request
@@ -96,28 +96,29 @@ Document size must be under 5,120 characters per document. You can have up to 1,
9696

9797
Create a POST request. You can [use Postman](text-analytics-how-to-call-api.md) or the **API testing console** in the following reference links to quickly structure and send one.
9898

99-
#### [Version 2](#tab/version-2)
99+
#### [Version 3.0-preview](#tab/version-3)
100100

101-
[Sentiment Analysis v2 reference](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v2-1/operations/56f30ceeeda5650db055a3c9)
101+
[Sentiment Analysis v3 reference](https://westus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-0-Preview-1/operations/Sentiment)
102102

103-
#### [Version 3 (Public preview)](#tab/version-3)
103+
#### [Version 2.1](#tab/version-2)
104104

105-
[Sentiment Analysis v3 reference](https://westus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-0-Preview-1/operations/Sentiment)
105+
[Sentiment Analysis v2 reference](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v2-1/operations/56f30ceeeda5650db055a3c9)
106106

107107
---
108108

109109
Set the HTTPS endpoint for sentiment analysis by using either a Text Analytics resource on Azure or an instantiated [Text Analytics container](text-analytics-how-to-install-containers.md). You must include the correct URL for the version you want to use. For example:
110-
111-
[!INCLUDE [text-analytics-find-resource-information](../includes/find-azure-resource-info.md)]
112110

113-
#### [Version 2](#tab/version-2)
114-
115-
`https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v2.1/sentiment`
111+
> [!NOTE]
112+
> You can find your key and endpoint for your Text Analytics resource on the azure portal. They will be located on the resource's **Quick start** page, under **resource management**.
116113
117-
#### [Version 3 (Public preview)](#tab/version-3)
114+
#### [Version 3.0-preview](#tab/version-3)
118115

119116
`https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v3.0-preview.1/sentiment`
120117

118+
#### [Version 2.1](#tab/version-2)
119+
120+
`https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v2.1/sentiment`
121+
121122
---
122123

123124
Set a request header to include your Text Analytics API key. In the request body, provide the JSON documents collection you prepared for this analysis.
@@ -156,26 +157,7 @@ The sentiment analyzer classifies text as predominantly positive or negative. It
156157

157158
Output is returned immediately. You can stream the results to an application that accepts JSON or save the output to a file on the local system. Then, import the output into an application that you can use to sort, search, and manipulate the data.
158159

159-
#### [Version 2](#tab/version-2)
160-
161-
### Sentiment Analysis v2 example response
162-
163-
Responses from Sentiment Analysis v2 contain sentiment scores for each sent document.
164-
165-
```json
166-
{
167-
"documents": [{
168-
"id": "1",
169-
"score": 0.98690706491470337
170-
}, {
171-
"id": "2",
172-
"score": 0.95202046632766724
173-
}],
174-
"errors": []
175-
}
176-
```
177-
178-
#### [Version 3 (Public preview)](#tab/version-3)
160+
#### [Version 3.0-preview](#tab/version-3)
179161

180162
### Sentiment Analysis v3 example response
181163

@@ -250,6 +232,26 @@ Responses from Sentiment Analysis v3 contain sentiment labels and scores for eac
250232
"errors": []
251233
}
252234
```
235+
236+
#### [Version 2.1](#tab/version-2)
237+
238+
### Sentiment Analysis v2 example response
239+
240+
Responses from Sentiment Analysis v2 contain sentiment scores for each sent document.
241+
242+
```json
243+
{
244+
"documents": [{
245+
"id": "1",
246+
"score": 0.98690706491470337
247+
}, {
248+
"id": "2",
249+
"score": 0.95202046632766724
250+
}],
251+
"errors": []
252+
}
253+
```
254+
253255
---
254256

255257
## Summary

0 commit comments

Comments
 (0)