文档

InterventionDictionaryEntry

更新时间:

干预词典的词条详情。

示例

{
    "cmd": "add",
    "word": "过儿",
    "created": 1536661485,
    "updated": 1537320187,
    "status": "ACTIVE",
    "relevance": {
        "100": "0",
        "200": "2"
    }
}

结构

各干预词典的词条结构各有不同,区分为共有字段 + 特有字段,详情如下 :

共有字段

字段

类型

描述

cmd

String

操作命令

  • add 新增

  • delete 删除

word

String

词条

status

String

状态

  • ACTIVE 已生效

created

Integer

创建时间戳

updated

Integer

更新时间戳

特有字段

stopword 停用词

字段

类型

描述

stopword

Boolean

干预类型

  • true 添加

  • false 屏蔽

synonym 同义词

字段

类型

描述

alias

Array

添加的同义词

antiAlias

Array

屏蔽的同义词

correction 拼写纠错

字段

类型

描述

correction

String

纠正词

enabled

Boolean

干预类型

  • true 添加

  • false 屏蔽

category_prediction 类目预测

字段

类型

描述

relevance

Object

干预内容键为类目预测ID,值为相关度(0:不相关;1:略相关;2:相关)例:{“2”:1,”100”:0}

term_weighting 词权重

字段

类型

描述

tokens[]

Object

词权重内容

tokens[].token

String

term

tokens[].weight

int

term权重,有7(权重高)、4(权重中)、1(权重低)

示例

{
  "word": "谭浩强c语言程序设计",
  "tokens": [
    {
      "token": "谭浩强",
      "weight": 7
    },
    {
      "token": "c语言",
      "weight": 7
    },
    {
      "token": "程序",
      "weight": 1
    },
    {
      "token": "设计",
      "weight": 1
    }
  ]
}

ner 实体识别

字段

类型

描述

tokens[]

Object

干预内容

tokens[].tag

String

  • 识别结果的英文名

  • 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 代理

tokens[].tagLabel

String

识别结果的中文名,同上,注意:传参时不需要此字段

tokens[].token

String

实体词

tokens[].order

Integer

序号

matchType

Integer

匹配类型,0 表示全query匹配时干预生效,1 表示query中有部分匹配干预也生效默认:0

示例

{
    "cmd": "add",
    "word": "豆本豆豆奶",
    "created": 1593429234,
    "updated": 1593429242,
    "status": "ACTIVE",
    "tokens": [{
            "tag": "category",
            "tagLabel": "品类",
            "token": "豆",
            "order": 1
        },
        {
            "tag": "category",
            "tagLabel": "品类",
            "token": "本",
            "order": 2
        },
        {
            "tag": "common",
            "tagLabel": "普通词",
            "token": "豆豆",
            "order": 3
        },
        {
            "tag": "category",
            "tagLabel": "品类",
            "token": "奶",
            "order": 4
        }
    ]
}

suggest_allowlist 下拉提示白名单

字段

类型

描述

score

Float

分数

matchType

Integer

匹配类型

  • 0

  • 1

  • 2

重要

score和matchType两个字段目前只读,不支持传参。

suggest_denylist下拉提示黑名单

字段

类型

描述

matchType

Integer

匹配类型

  • 0

  • 1

  • 2

重要

matchType字段目前只读,不支持传参。

hot_allowlist  热搜白名单

字段

类型

描述

rank

Integer

位置,取值范围:[1-10]

expirationTime

Integer

过期时间戳(秒)

hot_denylist  热搜黑名单

字段

类型

描述

matchType

Integer

匹配类型

  • 0

  • 1

  • 2

重要

matchType字段目前只读,不支持传参。

hint_allowlist  底纹白名单

字段

类型

描述

expirationTime

Integer

过期时间戳(秒)

hint_denylist  底纹黑名单

字段

类型

描述

matchType

Integer

匹配类型

  • 0

  • 1

  • 2

重要

matchType字段目前只读,不支持传参。

若有收获,就点个赞吧

  • 本页导读 (0)
文档反馈