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
Copy file name to clipboardExpand all lines: articles/cognitive-services/text-analytics/how-tos/text-analytics-how-to-language-detection.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ ms.author: aahi
14
14
15
15
# Example: Detect language with Text Analytics
16
16
17
-
The [Language Detection](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v2-1/operations/56f30ceeeda5650db055a3c7) feature of the Azure Text Analytics REST API evaluates text input for each document and returns language identifiers with a score that indicates the strength of the analysis.
17
+
The [Language Detection](https://westus2.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-0/operations/Languages) feature of the Azure Text Analytics REST API evaluates text input for each document and returns language identifiers with a score that indicates the strength of the analysis.
18
18
19
19
This capability is useful for content stores that collect arbitrary text, where language is unknown. You can parse the results of this analysis to determine which language is used in the input document. The response also returns a score that reflects the confidence of the model. The score value is between 0 and 1.
20
20
@@ -62,7 +62,7 @@ The document size must be under 5,120 characters per document. You can have up t
62
62
63
63
For more information on request definition, see [Call the Text Analytics API](text-analytics-how-to-call-api.md). The following points are restated for convenience:
64
64
65
-
+ Create a POST request. To review the API documentation for this request, see the [Language Detection API](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v2-1/operations/56f30ceeeda5650db055a3c7).
65
+
+ Create a POST request. To review the API documentation for this request, see the [Language Detection API](https://westus2.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-0/operations/Languages).
66
66
67
67
+ Set the HTTP endpoint for language detection. Use either a Text Analytics resource on Azure or an instantiated [Text Analytics container](text-analytics-how-to-install-containers.md). You must include `/text/analytics/v3.0/languages` in the URL. For example: `https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v3.0/languages`.
68
68
@@ -71,7 +71,7 @@ For more information on request definition, see [Call the Text Analytics API](te
71
71
+ In the request body, provide the JSON documents collection you prepared for this analysis.
72
72
73
73
> [!Tip]
74
-
> Use [Postman](text-analytics-how-to-call-api.md) or open the **API testing console** in the [documentation](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v2-1/operations/56f30ceeeda5650db055a3c7) to structure a request and POST it to the service.
74
+
> Use [Postman](text-analytics-how-to-call-api.md) or open the **API testing console** in the [documentation](https://westus2.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-0/operations/Languages) to structure a request and POST it to the service.
75
75
76
76
## Step 2: POST the request
77
77
@@ -181,7 +181,7 @@ The service now has additional context to make a better judgment:
181
181
{
182
182
"name": "English",
183
183
"iso6391Name": "en",
184
-
"ConfidenceScore": 1
184
+
"confidenceScore": 1
185
185
}
186
186
]
187
187
},
@@ -191,7 +191,7 @@ The service now has additional context to make a better judgment:
191
191
{
192
192
"name": "French",
193
193
"iso6391Name": "fr",
194
-
"ConfidenceScore": 1
194
+
"confidenceScore": 1
195
195
}
196
196
]
197
197
}
@@ -209,7 +209,7 @@ If the analyzer can't parse the input, it returns `(Unknown)`. An example is if
209
209
{
210
210
"name": "(Unknown)",
211
211
"iso6391Name": "(Unknown)",
212
-
"ConfidenceScore": "NaN"
212
+
"confidenceScore": "NaN"
213
213
}
214
214
]
215
215
}
@@ -245,7 +245,7 @@ The resulting output consists of the predominant language, with a score of less
245
245
{
246
246
"name": "Spanish",
247
247
"iso6391Name": "es",
248
-
"Confidencescore": 0.9375
248
+
"confidencescore": 0.94
249
249
}
250
250
]
251
251
}
@@ -258,7 +258,7 @@ The resulting output consists of the predominant language, with a score of less
258
258
259
259
In this article, you learned concepts and workflow for language detection by using Text Analytics in Azure Cognitive Services. The following points were explained and demonstrated:
260
260
261
-
+[Language detection](https://westcentralus.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v2-1/operations/56f30ceeeda5650db055a3c7) is available for a wide range of languages, variants, dialects, and some regional or cultural languages.
261
+
+[Language detection](https://westus2.dev.cognitive.microsoft.com/docs/services/TextAnalytics-v3-0/operations/Languages) is available for a wide range of languages, variants, dialects, and some regional or cultural languages.
262
262
+ JSON documents in the request body include an ID and text.
263
263
+ The POST request is to a `/languages` endpoint by using a personalized [access key and an endpoint](../../cognitive-services-apis-create-account.md#get-the-keys-for-your-resource) that's valid for your subscription.
264
264
+ Response output consists of language identifiers for each document ID. The output can be streamed to any app that accepts JSON. Example apps include Excel and Power BI, to name a few.
0 commit comments