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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release History

## 5.1.0 (Unreleased)
## 5.1.0 (2021-07-08)

This version of the SDK defaults to the latest supported API version, which currently is `v3.1`.
Includes all changes from `5.1.0b1` to `5.1.0b7`.
Expand Down
2 changes: 1 addition & 1 deletion sdk/textanalytics/azure-ai-textanalytics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con
[extract_key_phrases]: https://aka.ms/azsdk-python-textanalytics-extractkeyphrases
[detect_language]: https://aka.ms/azsdk-python-textanalytics-detectlanguage
[language_detection]: https://docs.microsoft.com/azure/cognitive-services/Text-Analytics/how-tos/text-analytics-how-to-language-detection
[language_and_regional_support]: https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support
[language_and_regional_support]: https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support?tabs=language-detection
[sentiment_analysis]: https://docs.microsoft.com/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-sentiment-analysis
[key_phrase_extraction]: https://docs.microsoft.com/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-keyword-extraction
[linked_entities_categories]: https://docs.microsoft.com/azure/cognitive-services/text-analytics/named-entity-types?tabs=general
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ class HealthcareEntity(DictMixin):

:ivar str text: Entity text as appears in the document.
:ivar str normalized_text: Optional. Normalized version of the raw `text` we extract
from the document. Not all `text`s have a normalized version.
from the document. Not all `text` will have a normalized version.
:ivar str category: Entity category, see the :class:`~azure.ai.textanalytics.HealthcareEntityCategory`
type for possible healthcare entity categories.
:ivar str subcategory: Entity subcategory.
Expand Down Expand Up @@ -1786,7 +1786,7 @@ def __repr__(self, **kwargs):
:1024
]

def to_generated(self):
def _to_generated(self):
return _v3_1_models.EntitiesTask(
parameters=_v3_1_models.EntitiesTaskParameters(
model_version=self.model_version,
Expand Down Expand Up @@ -1859,7 +1859,7 @@ def __repr__(self, **kwargs):
)[:1024]
)

def to_generated(self):
def _to_generated(self):
return _v3_1_models.SentimentAnalysisTask(
parameters=_v3_1_models.SentimentAnalysisTaskParameters(
model_version=self.model_version,
Expand Down Expand Up @@ -1937,7 +1937,7 @@ def __repr__(self, **kwargs):
)[:1024]
)

def to_generated(self):
def _to_generated(self):
return _v3_1_models.PiiTask(
parameters=_v3_1_models.PiiTaskParameters(
model_version=self.model_version,
Expand Down Expand Up @@ -1988,7 +1988,7 @@ def __repr__(self, **kwargs):
)[:1024]
)

def to_generated(self):
def _to_generated(self):
return _v3_1_models.KeyPhrasesTask(
parameters=_v3_1_models.KeyPhrasesTaskParameters(
model_version=self.model_version,
Expand Down Expand Up @@ -2046,7 +2046,7 @@ def __repr__(self, **kwargs):
)[:1024]
)

def to_generated(self):
def _to_generated(self):
return _v3_1_models.EntityLinkingTask(
parameters=_v3_1_models.EntityLinkingTaskParameters(
model_version=self.model_version,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@
class TextAnalyticsClient(TextAnalyticsClientBase):
"""The Text Analytics API is a suite of text analytics web services built with best-in-class
Microsoft machine learning algorithms. The API can be used to analyze unstructured text for
tasks such as sentiment analysis, key phrase extraction, and language detection. No training data
is needed to use this API - just bring your text data. This API uses advanced natural language
processing techniques to deliver best in class predictions.
tasks such as sentiment analysis, key phrase extraction, entities recognition,
and language detection. No training data is needed to use this API - just bring your text data.
This API uses advanced natural language processing techniques to deliver best in class predictions.

Further documentation can be found in
https://docs.microsoft.com/azure/cognitive-services/text-analytics/overview
Expand Down Expand Up @@ -340,7 +340,7 @@ def recognize_pii_entities( # type: ignore
the specific PII entity categories you want to filter out. For example, if you only want to filter out
U.S. social security numbers in a document, you can pass in
`[PiiEntityCategory.US_SOCIAL_SECURITY_NUMBER]` for this kwarg.
:paramtype categories_filter: list[~azure.ai.textanalytics.PiiEntityCategory]
:paramtype categories_filter: list[str] or list[~azure.ai.textanalytics.PiiEntityCategory]
:keyword str string_index_type: Specifies the method used to interpret string offsets.
`UnicodeCodePoint`, the Python encoding, is the default. To override the Python default,
you can also pass in `Utf16CodePoint` or `TextElement_v8`. For additional information
Expand Down Expand Up @@ -858,7 +858,7 @@ def begin_analyze_actions( # type: ignore

We recommend you use this function if you're looking to analyze larger documents, and / or
combine multiple Text Analytics actions into one call. Otherwise, we recommend you use
the action specific endpoints, for example :func:`analyze_sentiment`:
the action specific endpoints, for example :func:`analyze_sentiment`.

:param documents: The set of documents to process as part of this batch.
If you wish to specify the ID and language on a per-item basis you must
Expand Down Expand Up @@ -933,7 +933,7 @@ def begin_analyze_actions( # type: ignore
try:
analyze_tasks = self._client.models(api_version="v3.1").JobManifestTasks(
entity_recognition_tasks=[
t.to_generated()
t._to_generated() # pylint: disable=protected-access
for t in [
a
for a in actions
Expand All @@ -942,7 +942,7 @@ def begin_analyze_actions( # type: ignore
]
],
entity_recognition_pii_tasks=[
t.to_generated()
t._to_generated() # pylint: disable=protected-access
for t in [
a
for a in actions
Expand All @@ -951,7 +951,7 @@ def begin_analyze_actions( # type: ignore
]
],
key_phrase_extraction_tasks=[
t.to_generated()
t._to_generated() # pylint: disable=protected-access
for t in [
a
for a in actions
Expand All @@ -960,7 +960,7 @@ def begin_analyze_actions( # type: ignore
]
],
entity_linking_tasks=[
t.to_generated()
t._to_generated() # pylint: disable=protected-access
for t in [
a
for a in actions
Expand All @@ -969,7 +969,7 @@ def begin_analyze_actions( # type: ignore
]
],
sentiment_analysis_tasks=[
t.to_generated()
t._to_generated() # pylint: disable=protected-access
for t in [
a
for a in actions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@
class TextAnalyticsClient(AsyncTextAnalyticsClientBase):
"""The Text Analytics API is a suite of text analytics web services built with best-in-class
Microsoft machine learning algorithms. The API can be used to analyze unstructured text for
tasks such as sentiment analysis, key phrase extraction, and language detection. No training data
is needed to use this API - just bring your text data. This API uses advanced natural language
processing techniques to deliver best in class predictions.
tasks such as sentiment analysis, key phrase extraction, entities recognition,
and language detection. No training data is needed to use this API - just bring your text data.
This API uses advanced natural language processing techniques to deliver best in class predictions.

Further documentation can be found in
https://docs.microsoft.com/azure/cognitive-services/text-analytics/overview
Expand Down Expand Up @@ -336,7 +336,7 @@ async def recognize_pii_entities( # type: ignore
the specific PII entity categories you want to filter out. For example, if you only want to filter out
U.S. social security numbers in a document, you can pass in
`[PiiEntityCategory.US_SOCIAL_SECURITY_NUMBER]` for this kwarg.
:paramtype categories_filter: list[~azure.ai.textanalytics.PiiEntityCategory]
:paramtype categories_filter: list[str] or list[~azure.ai.textanalytics.PiiEntityCategory]
:keyword str string_index_type: Specifies the method used to interpret string offsets.
`UnicodeCodePoint`, the Python encoding, is the default. To override the Python default,
you can also pass in `Utf16CodePoint` or `TextElement_v8`. For additional information
Expand Down Expand Up @@ -868,7 +868,7 @@ async def begin_analyze_actions( # type: ignore

We recommend you use this function if you're looking to analyze larger documents, and / or
combine multiple Text Analytics actions into one call. Otherwise, we recommend you use
the action specific endpoints, for example :func:`analyze_sentiment`:
the action specific endpoints, for example :func:`analyze_sentiment`.

:param documents: The set of documents to process as part of this batch.
If you wish to specify the ID and language on a per-item basis you must
Expand Down Expand Up @@ -940,7 +940,7 @@ async def begin_analyze_actions( # type: ignore
try:
analyze_tasks = self._client.models(api_version="v3.1").JobManifestTasks(
entity_recognition_tasks=[
t.to_generated()
t._to_generated() # pylint: disable=protected-access
for t in [
a
for a in actions
Expand All @@ -949,7 +949,7 @@ async def begin_analyze_actions( # type: ignore
]
],
entity_recognition_pii_tasks=[
t.to_generated()
t._to_generated() # pylint: disable=protected-access
for t in [
a
for a in actions
Expand All @@ -958,7 +958,7 @@ async def begin_analyze_actions( # type: ignore
]
],
key_phrase_extraction_tasks=[
t.to_generated()
t._to_generated() # pylint: disable=protected-access
for t in [
a
for a in actions
Expand All @@ -967,7 +967,7 @@ async def begin_analyze_actions( # type: ignore
]
],
entity_linking_tasks=[
t.to_generated()
t._to_generated() # pylint: disable=protected-access
for t in [
a
for a in actions
Expand All @@ -976,7 +976,7 @@ async def begin_analyze_actions( # type: ignore
]
],
sentiment_analysis_tasks=[
t.to_generated()
t._to_generated() # pylint: disable=protected-access
for t in [
a
for a in actions
Expand Down