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:
Common fields
Field | Type | Description |
---|---|---|
cmd | String | The action. Valid values:
|
word | String | The intervention entry. |
status | String | The state of the intervention entry.
|
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:
|
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:
|
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 the 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 the intervention entry for named entity recognition (NER). |
tokens[].tag | String |
|
tokens[].tagLabel | String | The description of the internal name of the identified entity type. Note: This field does not need to be specified 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": "Doubendou soy milk",
"created": 1593429234,
"updated": 1593429242,
"status": "ACTIVE",
"tokens": [{
"tag": "category",
"tagLabel": "Category",
"token": "Dou",
"order": 1
},
{
"tag": "category",
"tagLabel": "Category",
"token": "ben",
"order": 2
},
{
"tag": "common",
"tagLabel": "Regular word",
"token": "soy",
"order": 3
},
{
"tag": "category",
"tagLabel": "Category",
"token": "milk",
"order": 4
}
]
}
Field | Type | Description |
score | Float | The score. |
matchType | Integer | The matching type. Valid values:
|
The score and matchType fields are read-only. The fields cannot be specified in the request.
Field | Type | Description |
matchType | Integer | The matching type. Valid values:
|
The matchType field is read-only. The field cannot be specified in the request.
Field | Type | Description |
rank | Integer | The ranking. Valid values: [1,10]. |
expirationTime | Integer | The timestamp when the intervention entry expires. Unit: seconds. |
Field | Type | Description |
matchType | Integer | The matching type. Valid values:
|
The matchType field is read-only. The field cannot be specified in the request.
Field | Type | Description |
expirationTime | Integer | The timestamp when the intervention entry expires. Unit: seconds. |
Field | Type | Description |
matchType | Integer | The matching type. Valid values:
|
The matchType field is read-only. The field cannot be specified in the request.
If this topic is helpful for you, give it a like.