New features
- Added the support for Personally Identifiable Information(PII) entity recognition feature.
- Re-release of version
1.0.1with updated version5.0.0.
- Update dependency version,
azure-coreto 1.6.0 andazure-core-http-nettyto 1.5.3.
- First stable release of
azure-ai-textanalytics.
New features
- Added Text property and
getText()toSentenceSentiment. Warningsproperty added to each document-level response object returned from the endpoints. It is a list ofTextAnalyticsWarnings.- Added
CategorizedEntityCollection,KeyPhrasesCollection,LinkedEntityCollectionfor havinggetWarnings()to retrieve warnings. - Added a new enum value
ADDRESStoEntityCategory. - Text analytics SDK update the service to version
v3.0fromv3.0-preview.1.
Breaking changes
- Removed pagination feature, which removed
TextAnalyticsPagedIterable,TextAnalyticsPagedFluxandTextAnalyticsPagedResponse - Removed overload methods for API that takes a list of String, only keep max-overload API that has a list of String, language or country hint, and
TextAnalyticsRequestOption. - Renamed
apiKey()tocredential()on TextAnalyticsClientBuilder. - Removed
getGraphemeLength()andgetGraphemeOffset()fromCategorizedEntity,SentenceSentiment, andLinkedEntityMatch. getGraphemeCount()inTextDocumentStatisticshas been renamed togetCharacterCount().getScore()inDetectedLanguagehas been renamed togetConfidenceScore().getSubCategory()inCategorizedEntityhas been renamed togetSubcategory().getLinkedEntityMatches()inLinkedEntityhas been renamed togetMatches().getCode()inTextAnalyticsExceptionandTextAnalyticsErrorhas been renamed togetErrorCode().getCode()inTextAnalyticsWarninghas been renamed togetWarningCode().- Async client returns errors, mono error or flux error but no longer throws exception. Sync client throws exceptions only.
- Deprecated
TextDocumentInput(String id, String text, String language)constructor, but addedsetLanguage()setter sincelanguageis optional. - Renamed
RecognizeCategorizedEntitiesResulttoRecognizeEntitiesResult. - Renamed
DocumentResulttoTextAnalyticsResult. - Removed
getServiceVersion()from both synchronous and asynchronous clients. - Replaced all single input asynchronous APIs, e.x.,
TextAnalyticsPagedFlux<CategorizedEntity> recognizeEntities(String document)toMono<CategorizedEntityCollection> recognizeEntities(String document).TextAnalyticsPagedFlux<LinkedEntity> recognizeLinkedEntities(String document)toMono<LinkedEntityCollection> recognizeLinkedEntities(String document).TextAnalyticsPagedFlux<String> extractKeyPhrases(String document)toMono<KeyPhrasesCollection> extractKeyPhrases(String document).
- Replaced all single input synchronous APIs, e.x.,
TextAnalyticsPagedIterable<CategorizedEntity> recognizeEntities(String document)toCategorizedEntityCollection recognizeEntities(String document).TextAnalyticsPagedIterable<LinkedEntity> recognizeLinkedEntities(String document)toLinkedEntityCollection recognizeLinkedEntities(String document).TextAnalyticsPagedIterable<String> extractKeyPhrases(String document)toKeyPhrasesCollection extractKeyPhrases(String document).
- Throws an illegal argument exception when the given list of documents is an empty list.
Breaking changes
- Renamed all input parameters
texttodocument, andinputTextstodocuments. - Removed all PII endpoints and update with related changes, such as remove related models, samples, codesnippets, docstrings, etc from this library.
- Replaced
TextAnalyticsApiKeyCredentialwithAzureKeyCredential.
New features
- Introduced
TextAnalyticsPagedFlux,TextAnalyticsPagedIterable, andTextAnalyticsPagedResponsetype. MovedmodelVersionamdTextDocumentBatchStatisticsintoTextAnalyticsPagedResponse. All collection APIs are returnTextAnalyticsPagedFluxandTextAnalyticsPagedIterablein the asynchronous and synchronous client, respectively. SoDocumentResultCollectionis no longer required. Most of existing API surface are changes. Please check upTextAnalyticsAsyncClientandTextAnalyticsClientfor more detail. - Introduced
EntityCategoryclass to support major entity categories that the service supported. - Added
getDefaultCountryHint(),getDefaultLanguage()andgetServiceVersion()toTextAnalyticsClient
Breaking changes
- Supported
Iterable<T>instead ofList<T>text inputs. - Default language and country hint can only be assigned value when building a Text Analytics client.
- Renamed
showStatistics()toisIncludeStatistics()in theTextAnalyticsRequestOptions. - Renamed
getErrorCodeValue()togetCode()in theTextAnalyticsException. - Renamed
getOffset(),getLength()andgetScore()togetGraphemeOffset(),getGraphemeLengthandgetConfidenceScore()inCategorizedEntity,LinkedEntityMatch,PiiEntity. - Renamed
SentimentLabeltoTextSentimentclass. - Renamed
SentimentScorePerLabeltoSentimentConfidenceScoresclass. - Renamed
getCharacterCount()togetGraphemeCount()in theTextDocumentStatistics. - Removed
InnerError,DocumentResultCollectionandTextAnalyticsClientOptionsclass.
Breaking changes
-
The single text, module-level operations return an atomic type of the operation result. For example,
detectLanguage(String text)returns aDetectedLanguagerather 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 andDocumentSentimentin 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
TextSentimentclass but createdDocumentSentimentandSentenceSentimentinstead.DocumentSentimentincludes a list ofSentenceSentiment. -
Added a new class model
SentimentScorePerLabelfor the scores of sentiment label. -
Added a new parameter
TextAnalyticsRequestOptions optionsto 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 thecredentialparameter. -
detectLanguages()is renamed todetectLanguage(). -
The
TextAnalyticsErrormodel has been simplified to an object with only attributescode,message, andtarget. -
RecognizePiiEntitiesResultnow contains on the object a list ofPiiEntityinstead ofNamedEntity. -
DetectLanguageResultno longer hasList<DetectedLanguage> detectedLanguages. UsegetPrimaryLanguage()to access the detected language in text. -
AnalyzeSentimentResultno longer takesList<TextSentiment> sentenceSentimentsand removedgetSentenceSentiments(). -
NamedEntityhas been renamed toCategorizedEntityand its attributestypetocategoryandsubtypetosubcategory. -
Renamed
SentimentClasstoSentimentLabel. -
getLinkedEntities()togetEntities()and variablelinkedEntitiestoentities. -
Added suffix of
batchto all operations' method name that takes a collection of input.
New features
- Credential class
TextAnalyticsApiKeyCredentialprovides 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
DocumentErrorobject, aTextAnalyticsExceptionis raised with a custom error message that provides the document ID and error of the invalid document.
Version 1.0.0-beta.1 is a preview of our efforts in creating a client library that is developer-friendly, idiomatic to the Java ecosystem, and as consistent across different languages and platforms as possible. The principles that guide our efforts can be found in the Azure SDK Design Guidelines for Java.
- It uses the Text Analytics service
v3.0-preview.1API. - New namespace/package name:
- The namespace/package name for Azure Text Analytics client library has changed from
com.microsoft.azure.cognitiveservices.language.textanalyticstocom.azure.ai.textanalytics
- The namespace/package name for Azure Text Analytics client library has changed from
- Added support for:
- Subscription key and AAD authentication for both synchronous and asynchronous clients.
- Language detection.
- Entity recognition.
- Entity linking recognition.
- Personally identifiable information entities recognition.
- Key phrases extraction.
- Analyze sentiment APIs including analysis for mixed sentiment.
- Reactive streams support using Project Reactor.
This package's documentation and samples demonstrate the new API.