1.0.0-beta.2 (2020-02-12)
Breaking changes
-
The single text, module-level operations return an atomic type of the operation result. For example,
detectLanguage(String text)
returns aDetectedLanguage
rather than aDetectLanguageResult
.For other module-level operations, :
recognizeEntities(String text)
, it no longer returns type ofMono<RecognizeEntitiesResult>
butPagedFlux<CategorizedEntity>
in asynchronous API andPagedIterable<CategorizedEntity>
in synchronous API.recognizePiiEntities(String text)
, it no longer returns type ofMono<RecognizePiiEntitiesResult>
butPagedFlux<PiiEntity>
in asynchronous API andPagedIterable<PiiEntity>
in synchronous API.recognizeLinkedEntities(String text)
, it no longer returns type ofMono<RecognizeLinkedEntitiesResult>
butPagedFlux<LinkedEntity>
in asynchronous API andPagedIterable<LinkedEntity>
in synchronous API.extractKeyPhrases(String text)
, it no longer returns type ofMono<ExtractKeyPhraseResult>
butPagedFlux<String>
in asynchronous API andPagedIterable<String>
in synchronous API.analyzeSentiment(String text)
, it no longer returns type ofMono<AnalyzeSentimentResult>
butMono<DocumentSentiment>
in asynchronous API andDocumentSentiment
in synchronous API.recognizeEntitiesWithResponse(String text, String language)
changed torecognizeEntities(String text, String language)
and returnPagedFlux<CategorizedEntity>
in asynchronous API andPagedIterable<CategorizedEntity>
in synchronous API as a collection of atomic typeCategorizedEntity
.recognizePiiEntitiesWithResponse(String text, String language)
changed torecognizePiiEntities(String text, String language)
and returnPagedFlux<PiiEntity>
in asynchronous API andPagedIterable<PiiEntity>
in synchronous API as a collection of atomic typePiiEntity
.recognizeLinkedEntitiesWithResponse(String text, String language)
changed torecognizeLinkedEntities(String text, String language)
and returnPagedFlux<LinkedEntity>
in asynchronous API andPagedIterable<LinkedEntity>
in synchronous API as a collection of atomic typeLinkedEntity
.extractKeyPhrasesWithResponse(String text, String language)
changed toextractKeyPhrases(String text, String language)
and returnPagedFlux<String>
in asynchronous API andPagedIterable<String>
in synchronous API as a collection of atomic typeString
.analyzeSentimentWithResponse(String text, String language)
returnMono<Response<DocumentSentiment>>
in asynchronous API andResponse<DocumentSentiment>
in synchronous API with an atomic typeDocumentSentiment
. -
Removed
TextSentiment
class but createdDocumentSentiment
andSentenceSentiment
instead.DocumentSentiment
includes a list ofSentenceSentiment
. -
Added a new class model
SentimentScorePerLabel
for the scores of sentiment label. -
Added a new parameter
TextAnalyticsRequestOptions options
to method overloads accepting a list of text inputs for allowing the users to opt for batch operation statistics. -
Passing the API key as a string is no longer supported. To use subscription key authentication a new credential class
TextAnalyticsApiKeyCredential("<api_key>")
must be passed in for thecredential
parameter. -
detectLanguages()
is renamed todetectLanguage()
. -
The
TextAnalyticsError
model has been simplified to an object with only attributescode
,message
, andtarget
. -
RecognizePiiEntitiesResult
now contains on the object a list ofPiiEntity
instead ofNamedEntity
. -
DetectLanguageResult
no longer hasList<DetectedLanguage> detectedLanguages
. UsegetPrimaryLanguage()
to access the detected language in text. -
AnalyzeSentimentResult
no longer takesList<TextSentiment> sentenceSentiments
and removedgetSentenceSentiments()
. -
NamedEntity
has been renamed toCategorizedEntity
and its attributestype
tocategory
andsubtype
tosubcategory
. -
Renamed
SentimentClass
toSentimentLabel
. -
getLinkedEntities()
togetEntities()
and variablelinkedEntities
toentities
. -
Added suffix of
batch
to all operations' method name that takes a collection of input.
New features
- Credential class
TextAnalyticsApiKeyCredential
provides anupdateCredential()
method which allows you to update the API key for long-lived clients.
Fixes and improvements
- If you try to access a result attribute on a
DocumentError
object, aTextAnalyticsException
is raised with a custom error message that provides the document ID and error of the invalid document.