Skip to content

Commit 7f5f3c6

Browse files
[textanalytics] bug bash readme feedback (Azure#22091)
* bug bash feedback for text analytics * fix wording/formatting
1 parent 4c74111 commit 7f5f3c6

File tree

1 file changed

+24
-23
lines changed
  • sdk/textanalytics/azure-ai-textanalytics

1 file changed

+24
-23
lines changed

sdk/textanalytics/azure-ai-textanalytics/README.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ _Azure SDK Python packages support for Python 2.7 is ending 01 January 2022. For
2424

2525
- Python 2.7, or 3.6 or later is required to use this package.
2626
- You must have an [Azure subscription][azure_subscription] and a
27-
[Cognitive Services or Text Analytics resource][ta_or_cs_resource] to use this package.
27+
[Cognitive Services or Language resource][ta_or_cs_resource] to use this package.
2828

29-
#### Create a Cognitive Services or Text Analytics resource
29+
#### Create a Cognitive Services or Language resource
3030

3131
Text Analytics supports both [multi-service and single-service access][multi_and_single_service].
32-
Create a Cognitive Services resource if you plan to access multiple cognitive services under a single endpoint/key. For Text Analytics access only, create a Text Analytics resource.
32+
Create a Cognitive Services resource if you plan to access multiple cognitive services under a single endpoint/key. For Text Analytics access only, create a Language resource.
3333

3434
You can create the resource using
3535

3636
**Option 1:** [Azure Portal][azure_portal_create_ta_resource]
3737

3838
**Option 2:** [Azure CLI][azure_cli_create_ta_resource].
39-
Below is an example of how you can create a Text Analytics resource using the CLI:
39+
Below is an example of how you can create a Language resource using the CLI:
4040

4141
```bash
4242
# Create a new resource group to hold the text analytics resource -
@@ -56,20 +56,19 @@ az cognitiveservices account create \
5656
```
5757

5858
Interaction with this service begins with an instance of a [client](#textanalyticsclient "TextAnalyticsClient").
59-
To create a client object, you will need the cognitive services or text analytics `endpoint` to
59+
To create a client object, you will need the cognitive services or language `endpoint` to
6060
your resource and a `credential` that allows you access:
6161

6262
```python
6363
from azure.core.credentials import AzureKeyCredential
6464
from azure.ai.textanalytics import TextAnalyticsClient
6565

6666
credential = AzureKeyCredential("<api_key>")
67-
text_analytics_client = TextAnalyticsClient(endpoint="https://<region>.api.cognitive.microsoft.com/", credential=credential)
67+
text_analytics_client = TextAnalyticsClient(endpoint="https://<resource-name>.cognitiveservices.azure.com/", credential=credential)
6868
```
6969

70-
Note that if you create a [custom subdomain][cognitive_custom_subdomain]
71-
name for your resource the endpoint may look different than in the above code snippet.
72-
For example, `https://<my-custom-subdomain>.cognitiveservices.azure.com/`.
70+
Note that for some Cognitive Services resources the endpoint might look different from the above code snippet.
71+
For example, `https://<region>.api.cognitive.microsoft.com/`.
7372

7473
### Install the package
7574

@@ -89,6 +88,8 @@ This table shows the relationship between SDK versions and supported API version
8988
| 5.1.0 - Latest GA release | 3.0, 3.1 (default) |
9089
| 5.0.0 | 3.0 |
9190

91+
API version can be selected by passing the [api_version][text_analytics_client] keyword argument into the client.
92+
For the latest Text Analytics features, consider selecting the most recent preview API version. For production scenarios, the latest GA version is recommended. Setting to an older version may result in reduced feature compatibility.
9293

9394
### Authenticate the client
9495

@@ -105,7 +106,7 @@ az cognitiveservices account show --name "resource-name" --resource-group "resou
105106

106107
#### Get the API Key
107108

108-
You can get the [API key][cognitive_authentication_api_key] from the Cognitive Services or Text Analytics resource in the [Azure Portal][azure_portal_get_endpoint].
109+
You can get the [API key][cognitive_authentication_api_key] from the Cognitive Services or Language resource in the [Azure Portal][azure_portal_get_endpoint].
109110
Alternatively, you can use [Azure CLI][azure_cli_endpoint_lookup] snippet below to get the API key of your resource.
110111

111112
`az cognitiveservices account keys list --name "resource-name" --resource-group "resource-group-name"`
@@ -120,7 +121,7 @@ from azure.core.credentials import AzureKeyCredential
120121
from azure.ai.textanalytics import TextAnalyticsClient
121122

122123
credential = AzureKeyCredential("<api_key>")
123-
text_analytics_client = TextAnalyticsClient(endpoint="https://<region>.api.cognitive.microsoft.com/", credential=credential)
124+
text_analytics_client = TextAnalyticsClient(endpoint="https://<resource-name>.cognitiveservices.azure.com/", credential=credential)
124125
```
125126

126127
#### Create a TextAnalyticsClient with an Azure Active Directory Credential
@@ -151,7 +152,7 @@ from azure.ai.textanalytics import TextAnalyticsClient
151152
from azure.identity import DefaultAzureCredential
152153

153154
credential = DefaultAzureCredential()
154-
text_analytics_client = TextAnalyticsClient(endpoint="https://<my-custom-subdomain>.api.cognitive.microsoft.com/", credential=credential)
155+
text_analytics_client = TextAnalyticsClient(endpoint="https://<resource-name>.cognitiveservices.azure.com/", credential=credential)
155156
```
156157

157158
## Key concepts
@@ -247,7 +248,7 @@ from azure.core.credentials import AzureKeyCredential
247248
from azure.ai.textanalytics import TextAnalyticsClient
248249

249250
credential = AzureKeyCredential("<api_key>")
250-
endpoint="https://<region>.api.cognitive.microsoft.com/"
251+
endpoint="https://<resource-name>.cognitiveservices.azure.com/"
251252

252253
text_analytics_client = TextAnalyticsClient(endpoint, credential)
253254

@@ -282,7 +283,7 @@ from azure.core.credentials import AzureKeyCredential
282283
from azure.ai.textanalytics import TextAnalyticsClient
283284

284285
credential = AzureKeyCredential("<api_key>")
285-
endpoint="https://<region>.api.cognitive.microsoft.com/"
286+
endpoint="https://<resource-name>.cognitiveservices.azure.com/"
286287

287288
text_analytics_client = TextAnalyticsClient(endpoint, credential)
288289

@@ -321,7 +322,7 @@ from azure.core.credentials import AzureKeyCredential
321322
from azure.ai.textanalytics import TextAnalyticsClient
322323

323324
credential = AzureKeyCredential("<api_key>")
324-
endpoint="https://<region>.api.cognitive.microsoft.com/"
325+
endpoint="https://<resource-name>.cognitiveservices.azure.com/"
325326

326327
text_analytics_client = TextAnalyticsClient(endpoint, credential)
327328

@@ -360,7 +361,7 @@ from azure.core.credentials import AzureKeyCredential
360361
from azure.ai.textanalytics import TextAnalyticsClient
361362

362363
credential = AzureKeyCredential("<api_key>")
363-
endpoint="https://<region>.api.cognitive.microsoft.com/"
364+
endpoint="https://<resource-name>.cognitiveservices.azure.com/"
364365

365366
text_analytics_client = TextAnalyticsClient(endpoint, credential)
366367

@@ -397,7 +398,7 @@ from azure.core.credentials import AzureKeyCredential
397398
from azure.ai.textanalytics import TextAnalyticsClient
398399

399400
credential = AzureKeyCredential("<api_key>")
400-
endpoint="https://<region>.api.cognitive.microsoft.com/"
401+
endpoint="https://<resource-name>.cognitiveservices.azure.com/"
401402

402403
text_analytics_client = TextAnalyticsClient(endpoint, credential)
403404

@@ -429,7 +430,7 @@ from azure.core.credentials import AzureKeyCredential
429430
from azure.ai.textanalytics import TextAnalyticsClient
430431

431432
credential = AzureKeyCredential("<api_key>")
432-
endpoint="https://<region>.api.cognitive.microsoft.com/"
433+
endpoint="https://<resource-name>.cognitiveservices.azure.com/"
433434

434435
text_analytics_client = TextAnalyticsClient(endpoint, credential)
435436

@@ -465,7 +466,7 @@ from azure.core.credentials import AzureKeyCredential
465466
from azure.ai.textanalytics import TextAnalyticsClient
466467

467468
credential = AzureKeyCredential("<api_key>")
468-
endpoint="https://<region>.api.cognitive.microsoft.com/"
469+
endpoint="https://<resource-name>.cognitiveservices.azure.com/"
469470

470471
text_analytics_client = TextAnalyticsClient(endpoint, credential)
471472

@@ -502,7 +503,7 @@ for idx, doc in enumerate(docs):
502503
print("------------------------------------------")
503504
```
504505

505-
Note: The Healthcare Entities Analysis service is available in API version v3.1 and up.
506+
Note: The Healthcare Entities Analysis service is only available in the Standard pricing tier with API versions v3.1 and up.
506507

507508
### Multiple Analysis
508509

@@ -527,7 +528,7 @@ from azure.ai.textanalytics import (
527528
)
528529

529530
credential = AzureKeyCredential("<api_key>")
530-
endpoint="https://<region>.api.cognitive.microsoft.com/"
531+
endpoint="https://<resource-name>.cognitiveservices.azure.com/"
531532

532533
text_analytics_client = TextAnalyticsClient(endpoint, credential)
533534

@@ -614,7 +615,7 @@ logger.setLevel(logging.DEBUG)
614615
handler = logging.StreamHandler(stream=sys.stdout)
615616
logger.addHandler(handler)
616617

617-
endpoint = "https://<my-custom-subdomain>.cognitiveservices.azure.com/"
618+
endpoint = "https://<resource-name>.cognitiveservices.azure.com/"
618619
credential = DefaultAzureCredential()
619620

620621
# This client will log detailed information about its HTTP sessions, at DEBUG level
@@ -637,7 +638,7 @@ These code samples show common scenario operations with the Azure Text Analytics
637638
The async versions of the samples (the python sample files appended with `_async`) show asynchronous operations
638639
with Text Analytics and require Python 3.6 or later.
639640

640-
Authenticate the client with a Cognitive Services/Text Analytics API key or a token credential from [azure-identity][azure_identity]:
641+
Authenticate the client with a Cognitive Services/Language API key or a token credential from [azure-identity][azure_identity]:
641642

642643
- [sample_authentication.py][sample_authentication] ([async version][sample_authentication_async])
643644

0 commit comments

Comments
 (0)