diff --git a/packages/@azure/cognitiveservices-textanalytics/lib/models/index.ts b/packages/@azure/cognitiveservices-textanalytics/lib/models/index.ts
index aad90e06e703..a9f590551f36 100644
--- a/packages/@azure/cognitiveservices-textanalytics/lib/models/index.ts
+++ b/packages/@azure/cognitiveservices-textanalytics/lib/models/index.ts
@@ -264,9 +264,9 @@ export interface SentimentBatchResult {
/**
* @interface
- * An interface representing MatchRecord.
+ * An interface representing MatchRecordV2dot1.
*/
-export interface MatchRecord {
+export interface MatchRecordV2dot1 {
/**
* @member {string} [text] Entity text as appears in the request.
*/
@@ -285,20 +285,18 @@ export interface MatchRecord {
/**
* @interface
- * An interface representing EntityRecord.
+ * An interface representing EntityRecordV2dot1.
*/
-export interface EntityRecord {
+export interface EntityRecordV2dot1 {
/**
* @member {string} [name] Entity formal name.
*/
name?: string;
/**
- * @member {MatchRecord[]} [matches] List of instances this entity appears in
- * the text.
- * **NOTE: This property will not be serialized. It can only be populated by
- * the server.**
+ * @member {MatchRecordV2dot1[]} [matches] List of instances this entity
+ * appears in the text.
*/
- readonly matches?: MatchRecord[];
+ matches?: MatchRecordV2dot1[];
/**
* @member {string} [wikipediaLanguage] Wikipedia language for which the
* WikipediaId and WikipediaUrl refers to.
@@ -322,13 +320,22 @@ export interface EntityRecord {
* relevant information.
*/
bingId?: string;
+ /**
+ * @member {string} [type] Entity type from Named Entity Recognition model
+ */
+ type?: string;
+ /**
+ * @member {string} [subType] Entity sub type from Named Entity Recognition
+ * model
+ */
+ subType?: string;
}
/**
* @interface
- * An interface representing EntitiesBatchResultItem.
+ * An interface representing EntitiesBatchResultItemV2dot1.
*/
-export interface EntitiesBatchResultItem {
+export interface EntitiesBatchResultItemV2dot1 {
/**
* @member {string} [id] Unique document identifier.
* **NOTE: This property will not be serialized. It can only be populated by
@@ -336,23 +343,24 @@ export interface EntitiesBatchResultItem {
*/
readonly id?: string;
/**
- * @member {EntityRecord[]} [entities] Recognized entities in the document.
+ * @member {EntityRecordV2dot1[]} [entities] Recognized entities in the
+ * document.
* **NOTE: This property will not be serialized. It can only be populated by
* the server.**
*/
- readonly entities?: EntityRecord[];
+ readonly entities?: EntityRecordV2dot1[];
}
/**
* @interface
- * An interface representing EntitiesBatchResult.
+ * An interface representing EntitiesBatchResultV2dot1.
*/
-export interface EntitiesBatchResult {
+export interface EntitiesBatchResultV2dot1 {
/**
- * @member {EntitiesBatchResultItem[]} [documents] **NOTE: This property will
- * not be serialized. It can only be populated by the server.**
+ * @member {EntitiesBatchResultItemV2dot1[]} [documents] **NOTE: This
+ * property will not be serialized. It can only be populated by the server.**
*/
- readonly documents?: EntitiesBatchResultItem[];
+ readonly documents?: EntitiesBatchResultItemV2dot1[];
/**
* @member {ErrorRecord[]} [errors] **NOTE: This property will not be
* serialized. It can only be populated by the server.**
@@ -420,7 +428,7 @@ export type SentimentResponse = SentimentBatchResult & {
/**
* Contains response data for the entities operation.
*/
-export type EntitiesResponse = EntitiesBatchResult & {
+export type EntitiesResponse = EntitiesBatchResultV2dot1 & {
/**
* The underlying HTTP response.
*/
@@ -432,6 +440,6 @@ export type EntitiesResponse = EntitiesBatchResult & {
/**
* The response body as parsed JSON or XML
*/
- parsedBody: EntitiesBatchResult;
+ parsedBody: EntitiesBatchResultV2dot1;
};
};
diff --git a/packages/@azure/cognitiveservices-textanalytics/lib/models/mappers.ts b/packages/@azure/cognitiveservices-textanalytics/lib/models/mappers.ts
index 38ca1761f46a..488c906dd494 100644
--- a/packages/@azure/cognitiveservices-textanalytics/lib/models/mappers.ts
+++ b/packages/@azure/cognitiveservices-textanalytics/lib/models/mappers.ts
@@ -410,11 +410,11 @@ export const SentimentBatchResult: msRest.CompositeMapper = {
}
};
-export const MatchRecord: msRest.CompositeMapper = {
- serializedName: "MatchRecord",
+export const MatchRecordV2dot1: msRest.CompositeMapper = {
+ serializedName: "MatchRecordV2dot1",
type: {
name: "Composite",
- className: "MatchRecord",
+ className: "MatchRecordV2dot1",
modelProperties: {
text: {
serializedName: "text",
@@ -438,11 +438,11 @@ export const MatchRecord: msRest.CompositeMapper = {
}
};
-export const EntityRecord: msRest.CompositeMapper = {
- serializedName: "EntityRecord",
+export const EntityRecordV2dot1: msRest.CompositeMapper = {
+ serializedName: "EntityRecordV2dot1",
type: {
name: "Composite",
- className: "EntityRecord",
+ className: "EntityRecordV2dot1",
modelProperties: {
name: {
serializedName: "name",
@@ -451,14 +451,13 @@ export const EntityRecord: msRest.CompositeMapper = {
}
},
matches: {
- readOnly: true,
serializedName: "matches",
type: {
name: "Sequence",
element: {
type: {
name: "Composite",
- className: "MatchRecord"
+ className: "MatchRecordV2dot1"
}
}
}
@@ -487,16 +486,28 @@ export const EntityRecord: msRest.CompositeMapper = {
type: {
name: "String"
}
+ },
+ type: {
+ serializedName: "type",
+ type: {
+ name: "String"
+ }
+ },
+ subType: {
+ serializedName: "subType",
+ type: {
+ name: "String"
+ }
}
}
}
};
-export const EntitiesBatchResultItem: msRest.CompositeMapper = {
- serializedName: "EntitiesBatchResultItem",
+export const EntitiesBatchResultItemV2dot1: msRest.CompositeMapper = {
+ serializedName: "EntitiesBatchResultItemV2dot1",
type: {
name: "Composite",
- className: "EntitiesBatchResultItem",
+ className: "EntitiesBatchResultItemV2dot1",
modelProperties: {
id: {
readOnly: true,
@@ -513,7 +524,7 @@ export const EntitiesBatchResultItem: msRest.CompositeMapper = {
element: {
type: {
name: "Composite",
- className: "EntityRecord"
+ className: "EntityRecordV2dot1"
}
}
}
@@ -522,11 +533,11 @@ export const EntitiesBatchResultItem: msRest.CompositeMapper = {
}
};
-export const EntitiesBatchResult: msRest.CompositeMapper = {
- serializedName: "EntitiesBatchResult",
+export const EntitiesBatchResultV2dot1: msRest.CompositeMapper = {
+ serializedName: "EntitiesBatchResultV2dot1",
type: {
name: "Composite",
- className: "EntitiesBatchResult",
+ className: "EntitiesBatchResultV2dot1",
modelProperties: {
documents: {
readOnly: true,
@@ -536,7 +547,7 @@ export const EntitiesBatchResult: msRest.CompositeMapper = {
element: {
type: {
name: "Composite",
- className: "EntitiesBatchResultItem"
+ className: "EntitiesBatchResultItemV2dot1"
}
}
}
diff --git a/packages/@azure/cognitiveservices-textanalytics/lib/textAnalyticsClient.ts b/packages/@azure/cognitiveservices-textanalytics/lib/textAnalyticsClient.ts
index 99fea5a028e5..733798d4ffbb 100644
--- a/packages/@azure/cognitiveservices-textanalytics/lib/textAnalyticsClient.ts
+++ b/packages/@azure/cognitiveservices-textanalytics/lib/textAnalyticsClient.ts
@@ -125,8 +125,18 @@ class TextAnalyticsClient extends TextAnalyticsClientContext {
}
/**
- * 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 Supported
+ * languages in Text Analytics API 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 Supported
+ * Entity Types in Text Analytics API for the list of supported Entity Types. See the Supported
* languages in Text Analytics API for the list of enabled languages.
* @summary The API returns a list of recognized entities in a given document.
@@ -139,14 +149,14 @@ class TextAnalyticsClient extends TextAnalyticsClientContext {
* @param input Collection of documents to analyze.
* @param callback The callback
*/
- entities(input: Models.MultiLanguageBatchInput, callback: msRest.ServiceCallback): void;
+ entities(input: Models.MultiLanguageBatchInput, callback: msRest.ServiceCallback): void;
/**
* @param input Collection of documents to analyze.
* @param options The optional parameters
* @param callback The callback
*/
- entities(input: Models.MultiLanguageBatchInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
- entities(input: Models.MultiLanguageBatchInput, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
+ entities(input: Models.MultiLanguageBatchInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ entities(input: Models.MultiLanguageBatchInput, options?: msRest.RequestOptionsBase, callback?: msRest.ServiceCallback): Promise {
return this.sendOperationRequest(
{
input,
@@ -246,7 +256,7 @@ const entitiesOperationSpec: msRest.OperationSpec = {
},
responses: {
200: {
- bodyMapper: Mappers.EntitiesBatchResult
+ bodyMapper: Mappers.EntitiesBatchResultV2dot1
},
default: {
bodyMapper: Mappers.ErrorResponse
diff --git a/packages/@azure/cognitiveservices-textanalytics/package.json b/packages/@azure/cognitiveservices-textanalytics/package.json
index 1643dc300e28..b9d1e7ab3346 100644
--- a/packages/@azure/cognitiveservices-textanalytics/package.json
+++ b/packages/@azure/cognitiveservices-textanalytics/package.json
@@ -4,7 +4,7 @@
"description": "TextAnalyticsClient Library with typescript type definitions for node.js and browser.",
"version": "1.0.0",
"dependencies": {
- "ms-rest-js": "^1.0.455",
+ "ms-rest-js": "^1.0.439",
"tslib": "^1.9.3"
},
"keywords": [