Skip to content

Commit

Permalink
[textanalytics] updating docs for release (Azure#25534)
Browse files Browse the repository at this point in the history
* updating docs for release

* update readmes

* add links to healthcare sample + add docs for kind

* add recordings to sdist
  • Loading branch information
kristapratico authored Aug 5, 2022
1 parent 75ee3e9 commit 07a647a
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 16 deletions.
4 changes: 2 additions & 2 deletions sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## 5.2.0b5 (Unreleased)

The version of this client library defaults to the API version `2022-05-01`.

### Features Added

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

### Bugs Fixed

### Other Changes

- 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).
Expand Down
2 changes: 1 addition & 1 deletion sdk/textanalytics/azure-ai-textanalytics/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
recursive-include tests *.py
recursive-include tests *.py *.json
recursive-include samples *.py *.md *.txt
include *.md
include LICENSE
Expand Down
11 changes: 6 additions & 5 deletions sdk/textanalytics/azure-ai-textanalytics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ Install the Azure Text Analytics client library for Python with [pip][pip]:
pip install azure-ai-textanalytics --pre
```

> 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.
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`.
> 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.
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`.

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

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

Expand Down Expand Up @@ -136,7 +136,7 @@ Authentication with AAD requires some initial setup:

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

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

```python
from azure.core.credentials import AzureKeyCredential
Expand Down Expand Up @@ -763,6 +763,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con
[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
[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
[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
[healthcare_action_sample]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_healthcare_action.py
[cla]: https://cla.microsoft.com
[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ def get(self, key, default=None):

class TextAnalysisKind(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Enumeration of supported Text Analysis kinds.
.. versionadded:: 2022-05-01
The *TextAnalysisKind* enum.
"""

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

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

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

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

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

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

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

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

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

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

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

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

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

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

def __init__(self, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -675,8 +675,8 @@ def begin_analyze_healthcare_entities(
.. versionadded:: v3.1
The *begin_analyze_healthcare_entities* client method.
.. versionadded:: 2022-04-01-preview
The *display_name* keyword arguments.
.. versionadded:: 2022-05-01
The *display_name* keyword argument.
.. admonition:: Example:
Expand Down Expand Up @@ -1135,7 +1135,7 @@ def begin_analyze_actions(
.. versionadded:: v3.1
The *begin_analyze_actions* client method.
.. versionadded:: 2022-04-01-preview
.. versionadded:: 2022-05-01
The *RecognizeCustomEntitiesAction*, *SingleLabelClassifyAction*,
*MultiLabelClassifyAction*, and *AnalyzeHealthcareEntitiesAction* input options and the
corresponding *RecognizeCustomEntitiesResult*, *ClassifyDocumentResult*,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -893,8 +893,8 @@ async def begin_analyze_healthcare_entities(
.. versionadded:: v3.1
The *begin_analyze_healthcare_entities* client method.
.. versionadded:: 2022-04-01-preview
The *display_name* keyword arguments.
.. versionadded:: 2022-05-01
The *display_name* keyword argument.
.. admonition:: Example:
Expand Down Expand Up @@ -1130,7 +1130,7 @@ async def begin_analyze_actions(
.. versionadded:: v3.1
The *begin_analyze_actions* client method.
.. versionadded:: 2022-04-01-preview
.. versionadded:: 2022-05-01
The *RecognizeCustomEntitiesAction*, *SingleLabelClassifyAction*,
*MultiLabelClassifyAction*, and *AnalyzeHealthcareEntitiesAction* input options and the
corresponding *RecognizeCustomEntitiesResult*, *ClassifyDocumentResult*,
Expand Down
4 changes: 2 additions & 2 deletions sdk/textanalytics/azure-ai-textanalytics/samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ what you can do with the Azure Text Analytics client library.
[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
[sample_model_version]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/sample_model_version.py
[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
[sample_analyze_healthcare_action]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples
[sample_analyze_healthcare_action_async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples
[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
[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
[pip]: https://pypi.org/project/pip/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_language_account]: https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account?tabs=singleservice%2Cwindows
Expand Down

0 comments on commit 07a647a

Please sign in to comment.