Creates an intervention dictionary.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses only common request headers. For more information, see Common request parameters.

Request syntax

POST /v4/openapi/intervention-dictionaries HTTP/1.1

Request parameters

Request body

Parameter

Type

Required

Example

Description

name

String

Yes

"my_dict"

The name of the intervention dictionary.

type

String

Yes

"ner"

The type of the intervention dictionary.

analyzer

String

No

"my_analyzer"

The custom analyzer.

If you set the type parameter to ner, the analyzer parameter is required.

For more information, see InterventionDictionary.

Response parameters

Parameter Type Example Description
requestId String 80326EFE-485F-46E7-B291-5A1DD08D2198

The ID of the request.

result Struct

The information about the intervention dictionary.

analyzer String dianshang

The custom analyzer.

created String 1591086323

The time when the intervention dictionary was created.

name String testb

The name of the intervention dictionary.

type String ner

The type of the intervention dictionary. Valid values:

  • stopword: an intervention dictionary for stop word filtering
  • synonym: an intervention dictionary for synonym configuration
  • correction: an intervention dictionary for spelling correction
  • category_prediction: an intervention dictionary for category prediction
  • ner: an intervention dictionary for named entity recognition (NER)
  • term_weighting: an intervention dictionary for term weight analysis
updated String 1591086323

The time when the intervention dictionary was last updated.

Examples

Sample requests

POST /v4/openapi/intervention-dictionaries

{
  "type": "ner",
  "name": "testb",
  "analyzer": "dianshang"
}

Sample success responses

XML format

<requestId>80326EFE-485F-46E7-B291-5A1DD08D2198</requestId>
<result>
    <analyzer>dianshang</analyzer>
    <created>1591086323</created>
    <id>1001</id>
    <name>testb</name>
    <type>ner</type>
    <updated>1591086323</updated>
</result>

JSON format

{
    "requestId": "80326EFE-485F-46E7-B291-5A1DD08D2198",
    "result": {
        "analyzer": "dianshang",
        "created": 1591086323,
        "id": 1001,
        "name": "testb",
        "type": "ner",
        "updated": 1591086323
    }
}

Error codes

For a list of error codes, visit the API Error Center.