更新时间:2020-09-04 11:17
干预词典的词条详情。
{
"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 | Boolean | 干预类型 - true 添加 - false 屏蔽 |
字段 | 类型 | 描述 |
---|---|---|
alias | Array | 添加的同义词 |
antiAlias | Array | 屏蔽的同义词 |
字段 | 类型 | 描述 |
---|---|---|
correction | String | 纠正词 |
enabled | Boolean | 干预类型 - true 添加 - false 屏蔽 |
字段 | 类型 | 描述 |
---|---|---|
relevance | Object | 干预内容 键为类目预测ID,值为相关度(0:不相关;1:略相关;2:相关) 例:{“2”:1,”100”:0} |
字段 | 类型 | 描述 |
---|---|---|
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
}
]
}
字段 | 类型 | 描述 |
---|---|---|
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
}
]
}
在文档使用中是否遇到以下问题
更多建议
匿名提交