github Azure/azure-sdk-for-java azure-ai-textanalytics_1.0.0-beta.2

latest releases: azure-sdk-template-three_1.0.0-beta.3864701, azure-sdk-template-two_1.0.0-beta.3864701, azure-sdk-template_1.2.1-beta.3864701...
pre-release4 years ago

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 a DetectedLanguage rather than a DetectLanguageResult.

    For other module-level operations, :

    recognizeEntities(String text), it no longer returns type of Mono<RecognizeEntitiesResult> but PagedFlux<CategorizedEntity> in asynchronous API and PagedIterable<CategorizedEntity> in synchronous API.

    recognizePiiEntities(String text), it no longer returns type of Mono<RecognizePiiEntitiesResult> but PagedFlux<PiiEntity> in asynchronous API and PagedIterable<PiiEntity> in synchronous API.

    recognizeLinkedEntities(String text), it no longer returns type of Mono<RecognizeLinkedEntitiesResult> but PagedFlux<LinkedEntity> in asynchronous API and PagedIterable<LinkedEntity> in synchronous API.

    extractKeyPhrases(String text), it no longer returns type of Mono<ExtractKeyPhraseResult> but PagedFlux<String> in asynchronous API and PagedIterable<String> in synchronous API.

    analyzeSentiment(String text), it no longer returns type of Mono<AnalyzeSentimentResult> but Mono<DocumentSentiment> in asynchronous API and DocumentSentiment in synchronous API.

    recognizeEntitiesWithResponse(String text, String language) changed to recognizeEntities(String text, String language) and return PagedFlux<CategorizedEntity> in asynchronous API and PagedIterable<CategorizedEntity> in synchronous API as a collection of atomic type CategorizedEntity.

    recognizePiiEntitiesWithResponse(String text, String language) changed to recognizePiiEntities(String text, String language) and return PagedFlux<PiiEntity> in asynchronous API and PagedIterable<PiiEntity> in synchronous API as a collection of atomic type PiiEntity.

    recognizeLinkedEntitiesWithResponse(String text, String language) changed to recognizeLinkedEntities(String text, String language) and return PagedFlux<LinkedEntity> in asynchronous API and PagedIterable<LinkedEntity> in synchronous API as a collection of atomic type LinkedEntity.

    extractKeyPhrasesWithResponse(String text, String language) changed to extractKeyPhrases(String text, String language) and return PagedFlux<String> in asynchronous API and PagedIterable<String> in synchronous API as a collection of atomic type String.

    analyzeSentimentWithResponse(String text, String language) return Mono<Response<DocumentSentiment>> in asynchronous API and Response<DocumentSentiment> in synchronous API with an atomic type DocumentSentiment.

  • Removed TextSentiment class but created DocumentSentiment and SentenceSentiment instead. DocumentSentiment includes a list of SentenceSentiment.

  • 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 the credential parameter.

  • detectLanguages() is renamed to detectLanguage().

  • The TextAnalyticsError model has been simplified to an object with only attributes code, message, and target.

  • RecognizePiiEntitiesResult now contains on the object a list of PiiEntity instead of NamedEntity.

  • DetectLanguageResult no longer has List<DetectedLanguage> detectedLanguages. Use getPrimaryLanguage() to access the detected language in text.

  • AnalyzeSentimentResult no longer takes List<TextSentiment> sentenceSentiments and removed getSentenceSentiments().

  • NamedEntity has been renamed to CategorizedEntity and its attributes type to category and subtype to subcategory.

  • Renamed SentimentClass to SentimentLabel.

  • getLinkedEntities() to getEntities() and variable linkedEntities to entities.

  • Added suffix of batch to all operations' method name that takes a collection of input.

New features

  • Credential class TextAnalyticsApiKeyCredential provides an updateCredential() 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, a TextAnalyticsException is raised with a custom error message that provides the document ID and error of the invalid document.

Don't miss a new azure-sdk-for-java release

NewReleases is sending notifications on new releases.