Skip to content

Commit 07a647a

Browse files
[textanalytics] updating docs for release (Azure#25534)
* updating docs for release * update readmes * add links to healthcare sample + add docs for kind * add recordings to sdist
1 parent 75ee3e9 commit 07a647a

File tree

7 files changed

+42
-16
lines changed

7 files changed

+42
-16
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## 5.2.0b5 (Unreleased)
44

5+
The version of this client library defaults to the API version `2022-05-01`.
6+
57
### Features Added
68

79
- Added `begin_recognize_custom_entities` client method to recognize custom named entities in documents.
@@ -23,8 +25,6 @@
2325
- Renamed `SingleCategoryClassifyAction` to `SingleLabelClassifyAction`
2426
- Renamed `MultiCategoryClassifyAction` to `MultiLabelClassifyAction`.
2527

26-
### Bugs Fixed
27-
2828
### Other Changes
2929

3030
- Python 3.6 is no longer supported. Please use Python version 3.7 or later. For more details, see [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).

sdk/textanalytics/azure-ai-textanalytics/MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
recursive-include tests *.py
1+
recursive-include tests *.py *.json
22
recursive-include samples *.py *.md *.txt
33
include *.md
44
include LICENSE

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ Install the Azure Text Analytics client library for Python with [pip][pip]:
7777
pip install azure-ai-textanalytics --pre
7878
```
7979

80-
> Note that `5.2.0b4` is the first version of the client library that targets the Azure Cognitive Service for Language APIs which includes the existing text analysis and natural language processing features found in the Text Analytics client library.
81-
In addition, the service API has changed from semantic to date-based versioning. This version of the client library defaults to the latest supported API version, which currently is `2022-04-01-preview`.
80+
> Note that `5.2.0b4` was the first version of the client library that targeted the Azure Cognitive Service for Language APIs which include the existing text analysis and natural language processing features found in the Text Analytics client library.
81+
In addition, the service API has changed from semantic to date-based versioning. This version of the client library defaults to the latest supported API version, which currently is `2022-05-01`.
8282

8383
This table shows the relationship between SDK versions and supported API versions of the service
8484

8585
| SDK version | Supported API version of service |
8686
| ------------ | --------------------------------- |
87-
| 5.2.0b4 - Latest beta release | 3.0, 3.1, 2022-04-01-preview (default) |
87+
| 5.2.0b5 - Latest beta release | 3.0, 3.1, 2022-05-01 (default) |
8888
| 5.1.0 - Latest stable release | 3.0, 3.1 (default) |
8989
| 5.0.0 | 3.0 |
9090

@@ -136,7 +136,7 @@ Authentication with AAD requires some initial setup:
136136

137137
- [Install azure-identity][install_azure_identity]
138138
- [Register a new AAD application][register_aad_app]
139-
- [Grant access][grant_role_access] to the Language service by assigning the `"Cognitive Services User"` role to your service principal.
139+
- [Grant access][grant_role_access] to the Language service by assigning the `"Cognitive Services Language Reader"` role to your service principal.
140140

141141
After setup, you can choose which type of [credential][azure_identity_credentials] from azure.identity to use.
142142
As an example, [DefaultAzureCredential][default_azure_credential]
@@ -531,7 +531,7 @@ Note: The Healthcare Entities Analysis service is only available in the Standard
531531
- Custom Entity Recognition (see sample [here][recognize_custom_entities_sample])
532532
- Custom Single Label Classification (see sample [here][single_label_classify_sample])
533533
- Custom Multi Label Classification (see sample [here][multi_label_classify_sample])
534-
- Healthcare Entities Analysis
534+
- Healthcare Entities Analysis (see sample [here][healthcare_action_sample])
535535

536536
```python
537537
from azure.core.credentials import AzureKeyCredential
@@ -763,6 +763,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con
763763
[single_label_classify_sample_async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_single_label_classify_async.py
764764
[multi_label_classify_sample]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/sample_multi_label_classify.py
765765
[multi_label_classify_sample_async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_multi_label_classify_async.py
766+
[healthcare_action_sample]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_healthcare_action.py
766767
[cla]: https://cla.microsoft.com
767768
[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/
768769
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/

sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ def get(self, key, default=None):
7474

7575
class TextAnalysisKind(str, Enum, metaclass=CaseInsensitiveEnumMeta):
7676
"""Enumeration of supported Text Analysis kinds.
77+
78+
.. versionadded:: 2022-05-01
79+
The *TextAnalysisKind* enum.
7780
"""
7881

7982
SENTIMENT_ANALYSIS = "SentimentAnalysis"
@@ -414,6 +417,7 @@ class RecognizeEntitiesResult(DictMixin):
414417
Optional[~azure.ai.textanalytics.TextDocumentStatistics]
415418
:ivar bool is_error: Boolean check for error item when iterating over list of
416419
results. Always False for an instance of a RecognizeEntitiesResult.
420+
:ivar str kind: The text analysis kind - "EntityRecognition".
417421
"""
418422

419423
def __init__(self, **kwargs):
@@ -458,6 +462,7 @@ class RecognizePiiEntitiesResult(DictMixin):
458462
Optional[~azure.ai.textanalytics.TextDocumentStatistics]
459463
:ivar bool is_error: Boolean check for error item when iterating over list of
460464
results. Always False for an instance of a RecognizePiiEntitiesResult.
465+
:ivar str kind: The text analysis kind - "PiiEntityRecognition".
461466
"""
462467

463468
def __init__(self, **kwargs):
@@ -509,6 +514,7 @@ class AnalyzeHealthcareEntitiesResult(DictMixin):
509514
Optional[~azure.ai.textanalytics.TextDocumentStatistics]
510515
:ivar bool is_error: Boolean check for error item when iterating over list of
511516
results. Always False for an instance of a AnalyzeHealthcareEntitiesResult.
517+
:ivar str kind: The text analysis kind - "Healthcare".
512518
"""
513519

514520
def __init__(self, **kwargs):
@@ -662,6 +668,7 @@ class DetectLanguageResult(DictMixin):
662668
Optional[~azure.ai.textanalytics.TextDocumentStatistics]
663669
:ivar bool is_error: Boolean check for error item when iterating over list of
664670
results. Always False for an instance of a DetectLanguageResult.
671+
:ivar str kind: The text analysis kind - "LanguageDetection".
665672
"""
666673

667674
def __init__(self, **kwargs):
@@ -1031,6 +1038,7 @@ class ExtractKeyPhrasesResult(DictMixin):
10311038
Optional[~azure.ai.textanalytics.TextDocumentStatistics]
10321039
:ivar bool is_error: Boolean check for error item when iterating over list of
10331040
results. Always False for an instance of a ExtractKeyPhrasesResult.
1041+
:ivar str kind: The text analysis kind - "KeyPhraseExtraction".
10341042
"""
10351043

10361044
def __init__(self, **kwargs):
@@ -1073,6 +1081,7 @@ class RecognizeLinkedEntitiesResult(DictMixin):
10731081
Optional[~azure.ai.textanalytics.TextDocumentStatistics]
10741082
:ivar bool is_error: Boolean check for error item when iterating over list of
10751083
results. Always False for an instance of a RecognizeLinkedEntitiesResult.
1084+
:ivar str kind: The text analysis kind - "EntityLinking".
10761085
"""
10771086

10781087
def __init__(self, **kwargs):
@@ -1124,6 +1133,7 @@ class AnalyzeSentimentResult(DictMixin):
11241133
list[~azure.ai.textanalytics.SentenceSentiment]
11251134
:ivar bool is_error: Boolean check for error item when iterating over list of
11261135
results. Always False for an instance of a AnalyzeSentimentResult.
1136+
:ivar str kind: The text analysis kind - "SentimentAnalysis".
11271137
"""
11281138

11291139
def __init__(self, **kwargs):
@@ -1195,6 +1205,7 @@ class DocumentError(DictMixin):
11951205
:vartype error: ~azure.ai.textanalytics.TextAnalyticsError
11961206
:ivar bool is_error: Boolean check for error item when iterating over list of
11971207
results. Always True for an instance of a DocumentError.
1208+
:ivar str kind: Error kind - "DocumentError".
11981209
"""
11991210

12001211
def __init__(self, **kwargs):
@@ -2192,6 +2203,9 @@ class RecognizeCustomEntitiesAction(DictMixin):
21922203
Cognitive Services Compliance and Privacy notes at https://aka.ms/cs-compliance for
21932204
additional details, and Microsoft Responsible AI principles at
21942205
https://www.microsoft.com/ai/responsible-ai.
2206+
2207+
.. versionadded:: 2022-05-01
2208+
The *RecognizeCustomEntitiesAction* model.
21952209
"""
21962210

21972211
def __init__(
@@ -2243,6 +2257,7 @@ class RecognizeCustomEntitiesResult(DictMixin):
22432257
:vartype statistics: Optional[~azure.ai.textanalytics.TextDocumentStatistics]
22442258
:ivar bool is_error: Boolean check for error item when iterating over list of
22452259
results. Always False for an instance of a RecognizeCustomEntitiesResult.
2260+
:ivar str kind: The text analysis kind - "CustomEntityRecognition".
22462261
"""
22472262

22482263
def __init__(self, **kwargs):
@@ -2309,6 +2324,9 @@ class MultiLabelClassifyAction(DictMixin):
23092324
Cognitive Services Compliance and Privacy notes at https://aka.ms/cs-compliance for
23102325
additional details, and Microsoft Responsible AI principles at
23112326
https://www.microsoft.com/ai/responsible-ai.
2327+
2328+
.. versionadded:: 2022-05-01
2329+
The *MultiLabelClassifyAction* model.
23122330
"""
23132331

23142332
def __init__(
@@ -2354,6 +2372,7 @@ class ClassifyDocumentResult(DictMixin):
23542372
:vartype statistics: Optional[~azure.ai.textanalytics.TextDocumentStatistics]
23552373
:ivar bool is_error: Boolean check for error item when iterating over list of
23562374
results. Always False for an instance of a ClassifyDocumentResult.
2375+
:ivar str kind: The text analysis kind - "CustomDocumentClassification".
23572376
"""
23582377

23592378
def __init__(
@@ -2424,6 +2443,9 @@ class SingleLabelClassifyAction(DictMixin):
24242443
Cognitive Services Compliance and Privacy notes at https://aka.ms/cs-compliance for
24252444
additional details, and Microsoft Responsible AI principles at
24262445
https://www.microsoft.com/ai/responsible-ai.
2446+
2447+
.. versionadded:: 2022-05-01
2448+
The *SingleLabelClassifyAction* model.
24272449
"""
24282450

24292451
def __init__(
@@ -2517,6 +2539,9 @@ class AnalyzeHealthcareEntitiesAction(DictMixin):
25172539
Cognitive Services Compliance and Privacy notes at https://aka.ms/cs-compliance for
25182540
additional details, and Microsoft Responsible AI principles at
25192541
https://www.microsoft.com/ai/responsible-ai.
2542+
2543+
.. versionadded:: 2022-05-01
2544+
The *AnalyzeHealthcareEntitiesAction* model.
25202545
"""
25212546

25222547
def __init__(self, **kwargs):

sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_text_analytics_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -675,8 +675,8 @@ def begin_analyze_healthcare_entities(
675675
676676
.. versionadded:: v3.1
677677
The *begin_analyze_healthcare_entities* client method.
678-
.. versionadded:: 2022-04-01-preview
679-
The *display_name* keyword arguments.
678+
.. versionadded:: 2022-05-01
679+
The *display_name* keyword argument.
680680
681681
.. admonition:: Example:
682682
@@ -1135,7 +1135,7 @@ def begin_analyze_actions(
11351135
11361136
.. versionadded:: v3.1
11371137
The *begin_analyze_actions* client method.
1138-
.. versionadded:: 2022-04-01-preview
1138+
.. versionadded:: 2022-05-01
11391139
The *RecognizeCustomEntitiesAction*, *SingleLabelClassifyAction*,
11401140
*MultiLabelClassifyAction*, and *AnalyzeHealthcareEntitiesAction* input options and the
11411141
corresponding *RecognizeCustomEntitiesResult*, *ClassifyDocumentResult*,

sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_text_analytics_client_async.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -893,8 +893,8 @@ async def begin_analyze_healthcare_entities(
893893
894894
.. versionadded:: v3.1
895895
The *begin_analyze_healthcare_entities* client method.
896-
.. versionadded:: 2022-04-01-preview
897-
The *display_name* keyword arguments.
896+
.. versionadded:: 2022-05-01
897+
The *display_name* keyword argument.
898898
899899
.. admonition:: Example:
900900
@@ -1130,7 +1130,7 @@ async def begin_analyze_actions(
11301130
11311131
.. versionadded:: v3.1
11321132
The *begin_analyze_actions* client method.
1133-
.. versionadded:: 2022-04-01-preview
1133+
.. versionadded:: 2022-05-01
11341134
The *RecognizeCustomEntitiesAction*, *SingleLabelClassifyAction*,
11351135
*MultiLabelClassifyAction*, and *AnalyzeHealthcareEntitiesAction* input options and the
11361136
corresponding *RecognizeCustomEntitiesResult*, *ClassifyDocumentResult*,

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ what you can do with the Azure Text Analytics client library.
110110
[multi_label_classify_sample_async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_multi_label_classify_async.py
111111
[sample_model_version]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/sample_model_version.py
112112
[sample_model_version_async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_model_version_async.py
113-
[sample_analyze_healthcare_action]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples
114-
[sample_analyze_healthcare_action_async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples
113+
[sample_analyze_healthcare_action]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_healthcare_action.py
114+
[sample_analyze_healthcare_action_async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_healthcare_action_async.py
115115
[pip]: https://pypi.org/project/pip/
116116
[azure_subscription]: https://azure.microsoft.com/free/
117117
[azure_language_account]: https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account?tabs=singleservice%2Cwindows

0 commit comments

Comments
 (0)