Skip to content

Commit 98f4c82

Browse files
[TA] revert auto LD change (Azure#29088)
* Revert "autoLD design change" This reverts commit 9c2e002. * update changelog and revert tests
1 parent cf3fc57 commit 98f4c82

File tree

6 files changed

+141
-165
lines changed

6 files changed

+141
-165
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ This version of the client library defaults to the service API version `2022-10-
1414
- Removed models `BaseResolution` and `BooleanResolution`.
1515
- Renamed model `AbstractSummaryAction` to `AbstractiveSummaryAction`.
1616
- Renamed model `AbstractSummaryResult` to `AbstractiveSummaryResult`.
17-
- Changed automatic language detection, it is now controlled by the boolean keyword argument `auto_detect_language`.
18-
Pass `True` to enable automatic language detection for text documents analyzed by long-running operation APIs.
19-
- Removed keyword argument `autodetect_default_language` - use `language` to provide a default/fallback language.
2017

2118
### Bugs Fixed
2219

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

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ class RecognizeEntitiesResult(DictMixin):
398398
"""If `show_stats=True` was specified in the request this
399399
field will contain information about the document payload."""
400400
detected_language: Optional[DetectedLanguage] = None
401-
"""If automatic language detection is enabled, then this
401+
"""If 'language' is set to 'auto' for the document in the request this
402402
field will contain the DetectedLanguage for the document."""
403403
is_error: Literal[False] = False
404404
"""Boolean check for error item when iterating over list of
@@ -449,7 +449,7 @@ class RecognizePiiEntitiesResult(DictMixin):
449449
"""If `show_stats=True` was specified in the request this
450450
field will contain information about the document payload."""
451451
detected_language: Optional[DetectedLanguage] = None
452-
"""If automatic language detection is enabled, then this
452+
"""If 'language' is set to 'auto' for the document in the request this
453453
field will contain the DetectedLanguage for the document."""
454454
is_error: Literal[False] = False
455455
"""Boolean check for error item when iterating over list of
@@ -508,7 +508,7 @@ class AnalyzeHealthcareEntitiesResult(DictMixin):
508508
FHIR compatible object for consumption in other Healthcare tools. For additional
509509
information see https://www.hl7.org/fhir/overview.html."""
510510
detected_language: Optional[str] = None
511-
"""If automatic language detection is enabled, then this
511+
"""If 'language' is set to 'auto' for the document in the request this
512512
field will contain the detected language for the document."""
513513
is_error: Literal[False] = False
514514
"""Boolean check for error item when iterating over list of
@@ -1061,7 +1061,7 @@ class ExtractKeyPhrasesResult(DictMixin):
10611061
"""If `show_stats=True` was specified in the request this
10621062
field will contain information about the document payload."""
10631063
detected_language: Optional[DetectedLanguage] = None
1064-
"""If automatic language detection is enabled, then this
1064+
"""If 'language' is set to 'auto' for the document in the request this
10651065
field will contain the DetectedLanguage for the document."""
10661066
is_error: Literal[False] = False
10671067
"""Boolean check for error item when iterating over list of
@@ -1107,7 +1107,7 @@ class RecognizeLinkedEntitiesResult(DictMixin):
11071107
"""If `show_stats=True` was specified in the request this
11081108
field will contain information about the document payload."""
11091109
detected_language: Optional[DetectedLanguage] = None
1110-
"""If automatic language detection is enabled, then this
1110+
"""If 'language' is set to 'auto' for the document in the request this
11111111
field will contain the DetectedLanguage for the document."""
11121112
is_error: Literal[False] = False
11131113
"""Boolean check for error item when iterating over list of
@@ -1161,7 +1161,7 @@ class AnalyzeSentimentResult(DictMixin):
11611161
"""If `show_stats=True` was specified in the request this
11621162
field will contain information about the document payload."""
11631163
detected_language: Optional[DetectedLanguage] = None
1164-
"""If automatic language detection is enabled, then this
1164+
"""If 'language' is set to 'auto' for the document in the request this
11651165
field will contain the DetectedLanguage for the document."""
11661166
is_error: Literal[False] = False
11671167
"""Boolean check for error item when iterating over list of
@@ -1441,7 +1441,12 @@ class TextDocumentInput(DictMixin, MultiLanguageInput):
14411441
:keyword str text: Required. The input text to process.
14421442
:keyword str language: This is the 2 letter ISO 639-1 representation
14431443
of a language. For example, use "en" for English; "es" for Spanish etc.
1444-
If not set, uses "en" for English as default.
1444+
For automatic language detection, use "auto" (Only supported by long-running
1445+
operation APIs with API version 2022-10-01-preview or newer). If
1446+
not set, uses "en" for English as default.
1447+
1448+
.. versionadded:: 2022-10-01-preview
1449+
The 'auto' option for language.
14451450
"""
14461451

14471452
id: str # pylint: disable=redefined-builtin
@@ -1451,7 +1456,9 @@ class TextDocumentInput(DictMixin, MultiLanguageInput):
14511456
language: Optional[str] = None
14521457
"""This is the 2 letter ISO 639-1 representation
14531458
of a language. For example, use "en" for English; "es" for Spanish etc.
1454-
If not set, uses "en" for English as default."""
1459+
For automatic language detection, use "auto" (Only supported by long-running
1460+
operation APIs with API version 2022-10-01-preview or newer). If
1461+
not set, uses "en" for English as default."""
14551462

14561463
def __init__(
14571464
self,
@@ -2329,7 +2336,7 @@ class RecognizeCustomEntitiesResult(DictMixin):
23292336
"""If `show_stats=True` was specified in the request this
23302337
field will contain information about the document payload."""
23312338
detected_language: Optional[DetectedLanguage] = None
2332-
"""If automatic language detection is enabled, then this
2339+
"""If 'language' is set to 'auto' for the document in the request this
23332340
field will contain the DetectedLanguage for the document."""
23342341
is_error: Literal[False] = False
23352342
"""Boolean check for error item when iterating over list of
@@ -2458,7 +2465,7 @@ class ClassifyDocumentResult(DictMixin):
24582465
"""If `show_stats=True` was specified in the request this
24592466
field will contain information about the document payload."""
24602467
detected_language: Optional[DetectedLanguage] = None
2461-
"""If automatic language detection is enabled, then this
2468+
"""If 'language' is set to 'auto' for the document in the request this
24622469
field will contain the DetectedLanguage for the document."""
24632470
is_error: Literal[False] = False
24642471
"""Boolean check for error item when iterating over list of
@@ -2792,7 +2799,7 @@ class ExtractSummaryResult(DictMixin):
27922799
"""If `show_stats=True` was specified in the request this
27932800
field will contain information about the document payload."""
27942801
detected_language: Optional[DetectedLanguage] = None
2795-
"""If automatic language detection is enabled, then this
2802+
"""If 'language' is set to 'auto' for the document in the request this
27962803
field will contain the DetectedLanguage for the document."""
27972804
is_error: Literal[False] = False
27982805
"""Boolean check for error item when iterating over list of
@@ -2899,7 +2906,7 @@ class AbstractiveSummaryResult(DictMixin):
28992906
"""Warnings encountered while processing document. Results will still be returned
29002907
if there are warnings, but they may not be fully accurate."""
29012908
detected_language: Optional[DetectedLanguage] = None
2902-
"""If automatic language detection is enabled, then this
2909+
"""If 'language' is set to 'auto' for the document in the request this
29032910
field will contain the DetectedLanguage for the document."""
29042911
statistics: Optional[TextDocumentStatistics] = None
29052912
"""If `show_stats=True` was specified in the request this

0 commit comments

Comments
 (0)