自然语言处理 NLP-命名实体识别(领域版):响应示例

时间:2024-01-17 15:35:04

响应示例

  • 成功响应示例1
    {
        "named_entities": [
            {
                "len": 2,
                "offset": 0,
                "tag": "day",
                "word": "昨天"
            },
            {
                "len": 3,
                "offset": 2,
                "tag": "job",
                "word": "程序员"
            },
            {
                "len": 3,
                "offset": 5,
                "tag": "nr",
                "word": "李小明"
            },
            {
                "len": 2,
                "offset": 10,
                "tag": "ns",
                "word": "北京"
            },
            {
                "len": 2,
                "offset": 32,
                "tag": "ord",
                "word": "第一"
            }
        ]
    }
  • 失败响应示例1
    {
        "error_code": "NLP.0301",
        "error_msg": "The length of text should be in the range of 1-512."
    }
support.huaweicloud.com/api-nlp/nlp_03_0060.html