Breaking changes
- The single text, module-level operations
single_detect_language()
,single_recognize_entities()
,single_extract_key_phrases()
,single_analyze_sentiment()
,single_recognize_pii_entities()
, andsingle_recognize_linked_entities()
have been removed from the client library. Use the batching methods for optimal performance in production environments. - To use an API key as the credential for authenticating the client, a new credential class
TextAnalyticsApiKeyCredential("<api_key>")
must be passed in for thecredential
parameter.
Passing the API key as a string is no longer supported. detect_languages()
is renamed todetect_language()
.- The
TextAnalyticsError
model has been simplified to an object with only attributescode
,message
, andtarget
. NamedEntity
has been renamed toCategorizedEntity
and its attributestype
tocategory
andsubtype
tosubcategory
.RecognizePiiEntitiesResult
now contains on the object a list ofPiiEntity
instead ofNamedEntity
.AnalyzeSentimentResult
attributedocument_scores
has been renamed tosentiment_scores
.SentenceSentiment
attributesentence_scores
has been renamed tosentiment_scores
.SentimentConfidenceScorePerLabel
has been renamed toSentimentScorePerLabel
.DetectLanguageResult
no longer has attributedetected_languages
. Useprimary_language
to access the detected language in text.
New features
- Credential class
TextAnalyticsApiKeyCredential
provides anupdate_key()
method which allows you to update the API key for long-lived clients.
Fixes and improvements
__repr__
has been added to all of the response objects.- If you try to access a result attribute on a
DocumentError
object, anAttributeError
is raised with a custom error message that provides the document ID and error of the invalid document.