更新时间:2024-05-11 GMT+08:00
分享

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

接口功能

实体识别接口。

请求入参

参数

类型

是否必选

描述

language

String

必选

语言,允许取值:

zh_CN

en_US

ar

es_ES

pt_BR

th_TH

multi

fr_FR

sentence

String

必选

识别文本

请求出参

参数

类型

描述

entityMsgV2List

List<EntityMsgV2>

请参见表1

count

int

识别的实体的数量

表1 单个EntityMsgV2的字段说明

参数

类型

描述

FORMAT_RAW

String

格式

id

int

id

citation

String

实体的引用名称

例如,系统实体中地址的引用名称

@system.address

type

int

实体类型

  • -1:系统或环境实体,非用户实体
  • 0:一般实体
  • 1:组合实体
  • 2:规则实体
  • 3:通过Lodas识别的实体

userEntity

boolean

是否为用户实体

envEntity

boolean

是否为环境实体

beginIndex

int

识别到实体值,在输入语句中的开始序号

endIndex

int

识别到实体值,在输入语句中的结束序号

values

Map<String,String>

具体识别出的实体值对

实体种类:实体值

例如:"@system.address": "湖南省长沙市岳麓区"

formats

List<String>

识别到实体的引用格式的列表

例如:["raw","province"],

"raw"为原始值,"province"为省份。

synonyms

List<String>

近义词

请求消息样例

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

分享:

    相关文档

    相关产品