| 接口地址:https://aip.baidubce.com/rpc/2.0/nlp/v1/depparser |
|---|
| 返回格式:json |
| 请求方式:post |
| 请求示例:https://aip.baidubce.com/rpc/2.0/nlp/v1/depparser?charset=UTF-8&access_token=test |
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| text | 必填 | string | 待分析文本(目前仅支持GBK编码),长度不超过256字节 |
| mode | 选填 | int | 模型选择。默认值为0,可选值mode=0(对应web模型);mode=1(对应query模型) |
| 名称 | 类型 | 说明 |
|---|---|---|
| log_id | uint64 | 随机数,本次请求的唯一标识码 |
| id | int | 词的ID |
| word | string | 词 |
| postag | string | 词性,请参照下方<strong>词性(postag)取值范围</strong> |
| head | int | 词的父节点ID |
| deprel | string | 词与父节点的依存关系,请参照下方<strong>依存关系标识</strong> |
{
"log_id": 12345,
"text": "今天天气怎么样",
"items": [{
"id": "1", //id
"word": "今天", //word
"postag": "t", //POS tag
"head": "2", //id of current word's parent
"deprel": "ATT" //depend relations between current word and parent
},
{
"id": "2",
"word": "天气",
"postag": "n",
"head": "3",
"deprel": "SBV",
},
{
"id": "3",
"word": "怎么样",
"postag": "r",
"head": "0",
"deprel": "HED",
}
]
}| 错误码 | 说明 |
|---|---|
| 1 | 服务器内部错误,请再次请求,如果持续出现此类错误,请通过QQ群(224994340)或工单联系技术支持团队 |
| 2 | 服务暂不可用,请再次请求,如果持续出现此类错误,请通过QQ群(224994340)或工单联系技术支持团队 |
| 3 | 调用的API不存在,请检查后重新尝试 |
| 4 | 集群超限额 |
| 6 | 无权限访问该用户数据 |
| 17 | 每天请求量超限额 |
| 18 | QPS超限额 |
| 19 | 请求总量超限额 |
| 100 | 包含了无效或错误参数,请检查代码 |
| 110 | Access Token失效 |
| 111 | Access token过期 |
| 282000 | 服务器内部错误,请再次请求, 如果持续出现此类错误,请通过QQ群(632426386)或工单联系技术支持团队。 |
| 282002 | 编码错误,请使用GBK编码 |
| 282004 | 请求中包含非法参数,请检查后重新尝试 |
| 282008 | 仅支持GBK和UTF-8,其余为不支持的字符编码,请检查后重新尝试 |
| 282130 | 当前查询无结果返回,出现此问题的原因一般为:参数配置存在问题,请检查后重新尝试 |
| 282131 | 输入长度超限,请查看文档说明 |
| 282133 | 接口参数缺失 |
| 282134 | 输入为空 |
| 282300 | word不在算法词典中 |
| 282301 | word_1提交的词汇暂未收录,无法比对相似度 |
| 282302 | word_2提交的词汇暂未收录,无法比对相似度 |
| 282303 | word_1和word_2暂未收录,无法比对相似度 |
小F正在拼命添加中...