All Products
Search
Document Center

InterventionDictionaryEntry

Last Updated: Sep 09, 2021

The information about an intervention entry in an intervention dictionary.

Example

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

Structure

The structure of the information about an intervention entry varies with the types of intervention dictionaries. The information consists of common fields and specific fields. For more information about the fields specific to different types of intervention entries, see the following sections:

Note

  • Intervention entry for stop word filtering

  • Intervention entry for synonym configuration

  • Intervention entry for spelling correction

  • Intervention entry for category prediction

  • Intervention entry for term weight analysis

  • Intervention entry for NER

Common fields

Field

Type

Description

cmd

String

The action. Valid values:

  • add

  • delete

word

String

The intervention entry.

status

String

The status of the intervention entry. Valid value:

  • ACTIVE: The intervention entry takes effect.

created

Integer

The timestamp when the intervention entry was created.

updated

Integer

The timestamp when the intervention entry was last updated.

Specific fields

Intervention entry for stop word filtering

Field

Type

Description

stopword

Boolean

The type of the intervention action. Valid values:

  • true: add

  • false: block

Intervention entry for synonym configuration

Field

Type

Description

alias

Array

The synonyms to be added.

antiAlias

Array

The synonyms to be blocked.

Intervention entry for spelling correction

Field

Type

Description

correction

String

The correcting query.

enabled

Boolean

The type of the intervention action. Valid values:

  • true: add

  • false: block

Intervention entry for category prediction

Field

Type

Description

relevance

Object

The field value consists of key-value pairs. The key indicates the ID of the category. The value indicates the relevance. A value of 0 indicates irrelevant. A value of 1 indicates slightly relevant. A value of 2 indicates relevant. Example: {"2":1,"100":0}.

Intervention entry for term weight analysis

Field

Type

Description

tokens[]

Object

The content of an intervention entry for term weight analysis.

tokens[].token

String

The term.

tokens[].weight

int

The weight of the term. A value of 7 indicates a high weight. A value of 4 indicates a medium weight. A value of 1 indicates a low weight.

Example

{
  "word": "Tan Haoqiang C language program design",
  "tokens": [
    {
      "token": "Tan Haoqiang",
      "weight": 7
    },
    {
      "token": "C language",
      "weight": 7
    },
    {
      "token": "program",
      "weight": 1
    },
    {
      "token": "design",
      "weight": 1
    }
  ]
}

Intervention entry for NER

Field

Type

Description

tokens[]

Object

The content of an intervention entry for named entity recognition (NER).

tokens[].tag

String

  • The internal name of the identified entity type. Valid values:

  • 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

The description of the internal name of the identified entity type. Note: This field does not need to be passed in the request.

tokens[].token

String

The entity.

tokens[].order

Integer

The sequence number.

matchType

Integer

The matching mode. Valid values: 0 and 1. Default value: 0. A value of 0 indicates that the intervention action is performed when a search query is the same as the intervention query. A value of 1 indicates that the intervention action is performed when specific terms of a search query match the intervention query.

Example

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