Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 7 additions & 1 deletion sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
# Release History

## 5.1.1 (Unreleased)
## 5.2.0b1 (Unreleased)

This version of the SDK defaults to the latest supported API version, which currently is `v3.2-preview.1`.

### Features Added
- Added support for Extractive Summarization actions through the `ExtractSummaryAction` type.

### Breaking Changes

### Bugs Fixed
- `RecognizePiiEntitiesAction` option `disable_service_logs` now correctly defaults to `True`.

### Other Changes

- Python 3.5 is no longer supported.

## 5.1.0 (2021-07-07)

This version of the SDK defaults to the latest supported API version, which currently is `v3.1`.
Expand Down
16 changes: 9 additions & 7 deletions sdk/textanalytics/azure-ai-textanalytics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Text Analytics is a cloud-based service that provides advanced natural language

### Prerequisites

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

Expand Down Expand Up @@ -71,15 +71,16 @@ For example, `https://<my-custom-subdomain>.cognitiveservices.azure.com/`.
Install the Azure Text Analytics client library for Python with [pip][pip]:

```bash
pip install azure-ai-textanalytics
pip install azure-ai-textanalytics --pre
```

> Note: This version of the client library defaults to the v3.1 version of the service
> Note: This version of the client library defaults to the v3.2-preview.1 version of the service

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

| SDK version | Supported API version of service |
| ------------ | --------------------------------- |
| 5.2.0b1 - Latest beta release | 3.0, 3.1, 3.2-preview.1 (default) |
| 5.1.0 - Latest GA release | 3.0, 3.1 (default) |
| 5.0.0 | 3.0 |

Expand Down Expand Up @@ -376,7 +377,7 @@ The returned response is a heterogeneous list of result and error objects: list[

Please refer to the service documentation for [supported PII entity types][pii_entity_categories].

Note: The Recognize PII Entities service is available only in the v3.1 API version.
Note: The Recognize PII Entities service is available in API version v3.1 and up.

### Extract key phrases

Expand Down Expand Up @@ -492,7 +493,7 @@ for idx, doc in enumerate(docs):
print("------------------------------------------")
```

Note: The Healthcare Entities Analysis service is available only in the v3.1 API version.
Note: The Healthcare Entities Analysis service is available in API version v3.1 and up.

### Multiple Analysis

Expand All @@ -503,6 +504,7 @@ Note: The Healthcare Entities Analysis service is available only in the v3.1 API
- Linked Entity Recognition
- Key Phrase Extraction
- Sentiment Analysis
- Extractive Summarization

```python
from azure.core.credentials import AzureKeyCredential
Expand Down Expand Up @@ -562,7 +564,7 @@ for doc, action_results in zip(documents, document_results):

The returned response is an object encapsulating multiple iterables, each representing results of individual analyses.

Note: Multiple analysis is available only in the v3.1 API version.
Note: Multiple analysis is available in API version v3.1 and up.

## Optional Configuration

Expand Down Expand Up @@ -621,7 +623,7 @@ result = text_analytics_client.analyze_sentiment(documents, logging_enable=True)

These code samples show common scenario operations with the Azure Text Analytics client library.
The async versions of the samples (the python sample files appended with `_async`) show asynchronous operations
with Text Analytics and require Python 3.5 or later.
with Text Analytics and require Python 3.6 or later.

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
EntityCertainty,
EntityAssociation,
HealthcareEntityCategory,
ExtractSummaryAction,
ExtractSummaryResult,
SummarySentence
)

from ._lro import AnalyzeHealthcareEntitiesLROPoller, AnalyzeActionsLROPoller
Expand Down Expand Up @@ -101,6 +104,9 @@
"AnalyzeHealthcareEntitiesLROPoller",
"AnalyzeActionsLROPoller",
"HealthcareEntityCategory",
"ExtractSummaryAction",
"ExtractSummaryResult",
"SummarySentence"
]

__version__ = VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
from ._generated import TextAnalyticsClient as _TextAnalyticsClient
from ._policies import TextAnalyticsResponseHookPolicy
from ._user_agent import USER_AGENT
from ._version import DEFAULT_API_VERSION


class TextAnalyticsApiVersion(str, Enum):
"""Text Analytics API versions supported by this package"""

#: this is the default version
V3_2_PREVIEW = "v3.2-preview.1"
V3_1 = "v3.1"
V3_0 = "v3.0"

Expand All @@ -40,7 +42,7 @@ def __init__(self, endpoint, credential, **kwargs):
self._client = _TextAnalyticsClient(
endpoint=endpoint,
credential=credential,
api_version=kwargs.pop("api_version", TextAnalyticsApiVersion.V3_1),
api_version=kwargs.pop("api_version", DEFAULT_API_VERSION),
sdk_moniker=USER_AGENT,
authentication_policy=_authentication_policy(credential),
custom_hook_policy=TextAnalyticsResponseHookPolicy(**kwargs),
Expand Down
Loading