获取干预词条清单。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求头

该接口使用公共请求头,无特殊请求头。请参见公共请求参数文档。

请求语法

GET /v4/openapi/intervention-dictionaries/[name]/entries HTTP/1.1

请求参数

名称 类型 位置 是否必选 示例值 描述
name String Path my_dict

干预词典名称

pageNumber Integer Query 1

页码,默认 pageNumber=1

word String Query 测试

词条

pageSize Integer Query 10

每页返回数目,默认 pageSize=10

返回数据

名称 类型 示例值 描述
requestId String 516A02B7-2167-8D92-12D0-B639A2A0F3C5

请求ID

result Array of wordItem

干预词条详情

参考:InterventionDictionaryEntry

cmd String add

操作命令

  • add 新增
  • delete 删除
created Long 1536690285

创建时间戳

relevance Map { "100": "0", "200": "2" }

干预内容

键为类目预测ID,值为相关度(0:不相关;1:略相关;2:相关)

例:{“2”:1,”100”:0}

status String ACTIVE

状态

  • ACTIVE 已生效
tokens Array of token

词权重内容

order Integer 1

序号

tag String category

识别结果的英文名

  • brand 品牌
  • category 品类
  • material 材质
  • element 款式元素
  • style 风格
  • color 颜色
  • function 功能功效
  • scenario 场景
  • people 人群
  • season 时间季节
  • model 型号
  • region 地点地域
  • name 人名
  • adjective 修饰
  • category-modifier 品类修饰词
  • size 尺寸规格
  • quality 品质成色
  • suit 套装
  • new-release 新品
  • series 系列
  • marketing 营销服务
  • entertainment 文娱书文曲
  • organization 机构实体
  • movie 影视名称
  • game 游戏名称
  • number 数字
  • unit 单位
  • common 普通词
  • new-word 新词
  • proper-noun 专有名词
  • symbol 符号
  • prefix 前缀
  • suffix 后缀
  • gift 赠送
  • negative 否定
  • agent 代理
tagLabel String 品类

识别结果的中文名,同上

token String

实体词

updated Long 1537348987

更新时间戳

word String \u8fc7\u513f

词条

totalCount Integer 8

总条数

示例

请求示例

GET /v4/openapi/intervention-dictionaries/test/entries

正常返回示例

XML格式

<requestId>516A02B7-2167-8D92-12D0-B639A2A0F3C5</requestId>
<result>
    <cmd>add</cmd>
    <word>过儿</word>
    <created>1536690285</created>
    <updated>1537348987</updated>
    <status>ACTIVE</status>
    <relevance>
        <100>0</100>
        <200>2</200>
    </relevance>
</result>
<result>
    <cmd>add</cmd>
    <word>过</word>
    <created>1536690308</created>
    <updated>1537349055</updated>
    <status>ACTIVE</status>
    <relevance>
        <200>2</200>
    </relevance>
</result>
<result>
    <cmd>add</cmd>
    <word>苹</word>
    <created>1536683292</created>
    <updated>1537220498</updated>
    <status>ACTIVE</status>
    <relevance>
        <12>1</12>
    </relevance>
</result>
<result>
    <cmd>add</cmd>
    <word>吧</word>
    <created>1536690347</created>
    <updated>1537220498</updated>
    <status>ACTIVE</status>
    <relevance>
        <100>2</100>
        <200>0</200>
    </relevance>
</result>
<result>
    <cmd>add</cmd>
    <word>果</word>
    <created>1536690184</created>
    <updated>1537220498</updated>
    <status>ACTIVE</status>
    <relevance>
        <100>2</100>
    </relevance>
</result>
<result>
    <cmd>add</cmd>
    <word>裤子</word>
    <created>1537353071</created>
    <updated>1537353074</updated>
    <status>ACTIVE</status>
    <relevance>
        <100>1</100>
        <200>2</200>
    </relevance>
</result>
<result>
    <cmd>add</cmd>
    <word>adfads</word>
    <created>1536690258</created>
    <updated>1537220498</updated>
    <status>ACTIVE</status>
    <relevance>
        <1>1</1>
        <2>1</2>
        <3>1</3>
    </relevance>
</result>
<result>
    <cmd>add</cmd>
    <word>zvzcxv</word>
    <created>1536690537</created>
    <updated>1537220498</updated>
    <status>ACTIVE</status>
    <relevance>
        <100>1</100>
    </relevance>
</result>
<totalCount>8</totalCount>

JSON格式

{
    "requestId": "516A02B7-2167-8D92-12D0-B639A2A0F3C5",
    "result": [
        {
            "cmd": "add",
            "word": "过儿",
            "created": 1536690285,
            "updated": 1537348987,
            "status": "ACTIVE",
            "relevance": {
                "100": 0,
                "200": 2
            }
        },
        {
            "cmd": "add",
            "word": "过",
            "created": 1536690308,
            "updated": 1537349055,
            "status": "ACTIVE",
            "relevance": {
                "200": 2
            }
        },
        {
            "cmd": "add",
            "word": "苹",
            "created": 1536683292,
            "updated": 1537220498,
            "status": "ACTIVE",
            "relevance": {
                "12": 1
            }
        },
        {
            "cmd": "add",
            "word": "吧",
            "created": 1536690347,
            "updated": 1537220498,
            "status": "ACTIVE",
            "relevance": {
                "100": 2,
                "200": 0
            }
        },
        {
            "cmd": "add",
            "word": "果",
            "created": 1536690184,
            "updated": 1537220498,
            "status": "ACTIVE",
            "relevance": {
                "100": 2
            }
        },
        {
            "cmd": "add",
            "word": "裤子",
            "created": 1537353071,
            "updated": 1537353074,
            "status": "ACTIVE",
            "relevance": {
                "100": 1,
                "200": 2
            }
        },
        {
            "cmd": "add",
            "word": "adfads",
            "created": 1536690258,
            "updated": 1537220498,
            "status": "ACTIVE",
            "relevance": {
                "1": 1,
                "2": 1,
                "3": 1
            }
        },
        {
            "cmd": "add",
            "word": "zvzcxv",
            "created": 1536690537,
            "updated": 1537220498,
            "status": "ACTIVE",
            "relevance": {
                "100": 1
            }
        }
    ],
    "totalCount": 8
}

错误码

访问错误中心查看更多错误码。