Updated on 2023-10-12 GMT+08:00

/chatbot/rest/tuc/v1/nlp/detectEntity

Function

Entity recognition interface.

Input Parameters

Parameter

Type

Mandatory (Yes/No)

Description

language

String

Yes

Language. The options are as follows:

zh_CN

en_US

ar

es_ES

pt_BR

th_TH

multi

fr_FR

sentence

String

Yes

Recognition text.

Output Parameters

Parameter

Type

Description

entityMsgV2List

List <EntityMsgV2>

For details, see Table 1.

count

Integer

Number of identified entities.

Table 1 EntityMsgV2 description

Parameter

Type

Description

FORMAT_RAW

String

Format.

id

Integer

ID.

citation

String

Reference name of an entity, for example, reference name of an address in a system entity (@system.address).

type

Integer

Entity type.

  • -1: system or environment entity, not a user entity
  • 0: common entity
  • 1: composite entity
  • 2: rule entity
  • 3: entity identified by the LODAS

userEntity

Boolean

Whether the entity is a user entity.

envEntity

Boolean

Whether the entity is an environment entity.

beginIndex

Integer

Start sequence number in the input statement when the entity value is identified.

endIndex

Integer

End sequence number in the input statement when the entity value is identified.

values

Map <String, String>

Identified entity value pair.

The value is in Entity type:Entity value format.

Example: "@system.address": "Yuelu District, Changsha City, Hunan Province"

formats

List <String>

List of reference formats that identify the entity.

For example, in the value ["raw","province"], "raw" indicates the original value, and "province" indicates the province.

synonyms

List <String>

Synonym.

Request Example

{
    "language": "${language}",
    "sentence": "${sentence}"
}