diff --git a/cognitiveservices/data-plane/language/textanalytics/src/main/java/com/microsoft/azure/cognitiveservices/language/textanalytics/TextAnalyticsClient.java b/cognitiveservices/data-plane/language/textanalytics/src/main/java/com/microsoft/azure/cognitiveservices/language/textanalytics/TextAnalyticsClient.java index 1e9da3748598..c68c3da20fc9 100644 --- a/cognitiveservices/data-plane/language/textanalytics/src/main/java/com/microsoft/azure/cognitiveservices/language/textanalytics/TextAnalyticsClient.java +++ b/cognitiveservices/data-plane/language/textanalytics/src/main/java/com/microsoft/azure/cognitiveservices/language/textanalytics/TextAnalyticsClient.java @@ -353,7 +353,7 @@ public interface TextAnalyticsClient { /** * The API returns a list of recognized entities in a given document. - * To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. + * The API returns a list of recognized entities in a given document. To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages.The API returns a list of known entities and general named entities ("Person", "Location", "Organization" etc) in a given document. Known entities are returned with Wikipedia Id and Wikipedia link, and also Bing Id which can be used in Bing Entity Search API. General named entities are returned with entity types. If a general named entity is also a known entity, then all information regarding it (Wikipedia Id, Bing Id, entity type etc) will be returned. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-entity-linking#supported-types-for-named-entity-recognition">Supported Entity Types in Text Analytics API</a> for the list of supported Entity Types. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. * * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorResponseException thrown if the request is rejected by server @@ -364,7 +364,7 @@ public interface TextAnalyticsClient { /** * The API returns a list of recognized entities in a given document. - * To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. + * The API returns a list of recognized entities in a given document. To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages.The API returns a list of known entities and general named entities ("Person", "Location", "Organization" etc) in a given document. Known entities are returned with Wikipedia Id and Wikipedia link, and also Bing Id which can be used in Bing Entity Search API. General named entities are returned with entity types. If a general named entity is also a known entity, then all information regarding it (Wikipedia Id, Bing Id, entity type etc) will be returned. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-entity-linking#supported-types-for-named-entity-recognition">Supported Entity Types in Text Analytics API</a> for the list of supported Entity Types. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -374,7 +374,7 @@ public interface TextAnalyticsClient { /** * The API returns a list of recognized entities in a given document. - * To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. + * The API returns a list of recognized entities in a given document. To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages.The API returns a list of known entities and general named entities ("Person", "Location", "Organization" etc) in a given document. Known entities are returned with Wikipedia Id and Wikipedia link, and also Bing Id which can be used in Bing Entity Search API. General named entities are returned with entity types. If a general named entity is also a known entity, then all information regarding it (Wikipedia Id, Bing Id, entity type etc) will be returned. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-entity-linking#supported-types-for-named-entity-recognition">Supported Entity Types in Text Analytics API</a> for the list of supported Entity Types. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the EntitiesBatchResult object @@ -383,7 +383,7 @@ public interface TextAnalyticsClient { /** * The API returns a list of recognized entities in a given document. - * To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. + * The API returns a list of recognized entities in a given document. To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages.The API returns a list of known entities and general named entities ("Person", "Location", "Organization" etc) in a given document. Known entities are returned with Wikipedia Id and Wikipedia link, and also Bing Id which can be used in Bing Entity Search API. General named entities are returned with entity types. If a general named entity is also a known entity, then all information regarding it (Wikipedia Id, Bing Id, entity type etc) will be returned. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-entity-linking#supported-types-for-named-entity-recognition">Supported Entity Types in Text Analytics API</a> for the list of supported Entity Types. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the EntitiesBatchResult object @@ -391,7 +391,7 @@ public interface TextAnalyticsClient { Observable> entitiesWithServiceResponseAsync(); /** * The API returns a list of recognized entities in a given document. - * To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. + * The API returns a list of recognized entities in a given document. To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages.The API returns a list of known entities and general named entities ("Person", "Location", "Organization" etc) in a given document. Known entities are returned with Wikipedia Id and Wikipedia link, and also Bing Id which can be used in Bing Entity Search API. General named entities are returned with entity types. If a general named entity is also a known entity, then all information regarding it (Wikipedia Id, Bing Id, entity type etc) will be returned. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-entity-linking#supported-types-for-named-entity-recognition">Supported Entity Types in Text Analytics API</a> for the list of supported Entity Types. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. * * @param documents the List<MultiLanguageInput> value * @throws IllegalArgumentException thrown if parameters fail the validation @@ -403,7 +403,7 @@ public interface TextAnalyticsClient { /** * The API returns a list of recognized entities in a given document. - * To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. + * The API returns a list of recognized entities in a given document. To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages.The API returns a list of known entities and general named entities ("Person", "Location", "Organization" etc) in a given document. Known entities are returned with Wikipedia Id and Wikipedia link, and also Bing Id which can be used in Bing Entity Search API. General named entities are returned with entity types. If a general named entity is also a known entity, then all information regarding it (Wikipedia Id, Bing Id, entity type etc) will be returned. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-entity-linking#supported-types-for-named-entity-recognition">Supported Entity Types in Text Analytics API</a> for the list of supported Entity Types. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. * * @param documents the List<MultiLanguageInput> value * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -414,7 +414,7 @@ public interface TextAnalyticsClient { /** * The API returns a list of recognized entities in a given document. - * To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. + * The API returns a list of recognized entities in a given document. To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages.The API returns a list of known entities and general named entities ("Person", "Location", "Organization" etc) in a given document. Known entities are returned with Wikipedia Id and Wikipedia link, and also Bing Id which can be used in Bing Entity Search API. General named entities are returned with entity types. If a general named entity is also a known entity, then all information regarding it (Wikipedia Id, Bing Id, entity type etc) will be returned. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-entity-linking#supported-types-for-named-entity-recognition">Supported Entity Types in Text Analytics API</a> for the list of supported Entity Types. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. * * @param documents the List<MultiLanguageInput> value * @throws IllegalArgumentException thrown if parameters fail the validation @@ -424,7 +424,7 @@ public interface TextAnalyticsClient { /** * The API returns a list of recognized entities in a given document. - * To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. + * The API returns a list of recognized entities in a given document. To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages.The API returns a list of known entities and general named entities ("Person", "Location", "Organization" etc) in a given document. Known entities are returned with Wikipedia Id and Wikipedia link, and also Bing Id which can be used in Bing Entity Search API. General named entities are returned with entity types. If a general named entity is also a known entity, then all information regarding it (Wikipedia Id, Bing Id, entity type etc) will be returned. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-entity-linking#supported-types-for-named-entity-recognition">Supported Entity Types in Text Analytics API</a> for the list of supported Entity Types. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. * * @param documents the List<MultiLanguageInput> value * @throws IllegalArgumentException thrown if parameters fail the validation diff --git a/cognitiveservices/data-plane/language/textanalytics/src/main/java/com/microsoft/azure/cognitiveservices/language/textanalytics/implementation/TextAnalyticsClientImpl.java b/cognitiveservices/data-plane/language/textanalytics/src/main/java/com/microsoft/azure/cognitiveservices/language/textanalytics/implementation/TextAnalyticsClientImpl.java index 67b41d0a86d6..3a13c01266bc 100644 --- a/cognitiveservices/data-plane/language/textanalytics/src/main/java/com/microsoft/azure/cognitiveservices/language/textanalytics/implementation/TextAnalyticsClientImpl.java +++ b/cognitiveservices/data-plane/language/textanalytics/src/main/java/com/microsoft/azure/cognitiveservices/language/textanalytics/implementation/TextAnalyticsClientImpl.java @@ -154,7 +154,7 @@ public TextAnalyticsClientImpl withGenerateClientRequestId(boolean generateClien * @param credentials the management credentials for Azure */ public TextAnalyticsClientImpl(ServiceClientCredentials credentials) { - this("https://{Endpoint}/text/analytics/v2.0", credentials); + this("https://{Endpoint}/text/analytics/v2.1-preview", credentials); } /** @@ -193,7 +193,7 @@ protected void initialize() { */ @Override public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "TextAnalyticsClient", "v2.0"); + return String.format("%s (%s, %s)", super.userAgent(), "TextAnalyticsClient", "v2.1-preview"); } private void initializeService() { @@ -678,7 +678,7 @@ private ServiceResponse sentimentDelegate(Response entitiesAsync(final ServiceCallback response) { /** * The API returns a list of recognized entities in a given document. - * To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. + * The API returns a list of recognized entities in a given document. To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages.The API returns a list of known entities and general named entities ("Person", "Location", "Organization" etc) in a given document. Known entities are returned with Wikipedia Id and Wikipedia link, and also Bing Id which can be used in Bing Entity Search API. General named entities are returned with entity types. If a general named entity is also a known entity, then all information regarding it (Wikipedia Id, Bing Id, entity type etc) will be returned. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-entity-linking#supported-types-for-named-entity-recognition">Supported Entity Types in Text Analytics API</a> for the list of supported Entity Types. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the EntitiesBatchResult object @@ -748,7 +748,7 @@ public Observable> call(Response documents) { /** * The API returns a list of recognized entities in a given document. - * To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. + * The API returns a list of recognized entities in a given document. To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages.The API returns a list of known entities and general named entities ("Person", "Location", "Organization" etc) in a given document. Known entities are returned with Wikipedia Id and Wikipedia link, and also Bing Id which can be used in Bing Entity Search API. General named entities are returned with entity types. If a general named entity is also a known entity, then all information regarding it (Wikipedia Id, Bing Id, entity type etc) will be returned. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-entity-linking#supported-types-for-named-entity-recognition">Supported Entity Types in Text Analytics API</a> for the list of supported Entity Types. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. * * @param documents the List<MultiLanguageInput> value * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -775,7 +775,7 @@ public ServiceFuture entitiesAsync(List /** * The API returns a list of recognized entities in a given document. - * To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. + * The API returns a list of recognized entities in a given document. To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages.The API returns a list of known entities and general named entities ("Person", "Location", "Organization" etc) in a given document. Known entities are returned with Wikipedia Id and Wikipedia link, and also Bing Id which can be used in Bing Entity Search API. General named entities are returned with entity types. If a general named entity is also a known entity, then all information regarding it (Wikipedia Id, Bing Id, entity type etc) will be returned. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-entity-linking#supported-types-for-named-entity-recognition">Supported Entity Types in Text Analytics API</a> for the list of supported Entity Types. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. * * @param documents the List<MultiLanguageInput> value * @throws IllegalArgumentException thrown if parameters fail the validation @@ -792,7 +792,7 @@ public EntitiesBatchResult call(ServiceResponse response) { /** * The API returns a list of recognized entities in a given document. - * To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. + * The API returns a list of recognized entities in a given document. To get even more information on each recognized entity we recommend using the Bing Entity Search API by querying for the recognized entities names. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages.The API returns a list of known entities and general named entities ("Person", "Location", "Organization" etc) in a given document. Known entities are returned with Wikipedia Id and Wikipedia link, and also Bing Id which can be used in Bing Entity Search API. General named entities are returned with entity types. If a general named entity is also a known entity, then all information regarding it (Wikipedia Id, Bing Id, entity type etc) will be returned. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-entity-linking#supported-types-for-named-entity-recognition">Supported Entity Types in Text Analytics API</a> for the list of supported Entity Types. See the <a href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages">Supported languages in Text Analytics API</a> for the list of enabled languages. * * @param documents the List<MultiLanguageInput> value * @throws IllegalArgumentException thrown if parameters fail the validation diff --git a/cognitiveservices/data-plane/language/textanalytics/src/main/java/com/microsoft/azure/cognitiveservices/language/textanalytics/models/EntityRecord.java b/cognitiveservices/data-plane/language/textanalytics/src/main/java/com/microsoft/azure/cognitiveservices/language/textanalytics/models/EntityRecord.java index 26e6a793ab0a..441cdcd44411 100755 --- a/cognitiveservices/data-plane/language/textanalytics/src/main/java/com/microsoft/azure/cognitiveservices/language/textanalytics/models/EntityRecord.java +++ b/cognitiveservices/data-plane/language/textanalytics/src/main/java/com/microsoft/azure/cognitiveservices/language/textanalytics/models/EntityRecord.java @@ -24,7 +24,7 @@ public class EntityRecord { /** * List of instances this entity appears in the text. */ - @JsonProperty(value = "matches", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "matches") private List matches; /** @@ -52,6 +52,18 @@ public class EntityRecord { @JsonProperty(value = "bingId") private String bingId; + /** + * Entity type from Named Entity Recognition model. + */ + @JsonProperty(value = "type") + private String type; + + /** + * Entity sub type from Named Entity Recognition model. + */ + @JsonProperty(value = "subType") + private String subType; + /** * Get entity formal name. * @@ -81,6 +93,17 @@ public List matches() { return this.matches; } + /** + * Set list of instances this entity appears in the text. + * + * @param matches the matches value to set + * @return the EntityRecord object itself. + */ + public EntityRecord withMatches(List matches) { + this.matches = matches; + return this; + } + /** * Get wikipedia language for which the WikipediaId and WikipediaUrl refers to. * @@ -150,4 +173,44 @@ public EntityRecord withBingId(String bingId) { return this; } + /** + * Get entity type from Named Entity Recognition model. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set entity type from Named Entity Recognition model. + * + * @param type the type value to set + * @return the EntityRecord object itself. + */ + public EntityRecord withType(String type) { + this.type = type; + return this; + } + + /** + * Get entity sub type from Named Entity Recognition model. + * + * @return the subType value + */ + public String subType() { + return this.subType; + } + + /** + * Set entity sub type from Named Entity Recognition model. + * + * @param subType the subType value to set + * @return the EntityRecord object itself. + */ + public EntityRecord withSubType(String subType) { + this.subType = subType; + return this; + } + }