Help Center/ Content Moderation/ API Reference/ Appendix/ Configuring Custom Dictionaries
Updated on 2025-07-02 GMT+08:00

Configuring Custom Dictionaries

When using Text Moderation, you can configure a custom allowlist dictionary and a custom blocklist dictionary to filter and detect specified text content.

  • Moderation (Audio), Moderation (Video), and Moderation (Audio Stream) do not support custom word dictionaries.
  • You need to maintain the custom dictionaries you have created.

Background

  • To configure custom dictionaries, subscribe to Moderation (Text) first. For details about how to enable this service, see Subscribing to a Service.
  • You can use custom dictionaries for free.
  • An account can create a maximum of 20 custom word dictionaries.

Verify that a custom glossary can be created.

Select Pass for the handling suggestion of the whitelist word library and Violation or Suspected for the handling suggestion of the blacklist word library.

You can customize an allowlist dictionary so that the words in the allowlist dictionary will be free from detection when you use Text Moderation.

  1. Log in to the Content Moderation management console.
  2. In the navigation pane, choose Content Moderation V3 > Custom Dictionary. On the displayed page, click the Allowlist Libraries tab and then Create Dictionary.
    Figure 1 Create Dictionary
  3. Set parameters and click to confirm.
    • Dictionary Name: A dictionary name contains a maximum of 50 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed.
    • Handling Suggestion: The options include Pass, Violation, and Suspected. Pass indicates an allowlist dictionary, and Violation and Suspected indicate a blocklist dictionary.
    • Application Scenario: Select the scenario, which can be Terrorism, Pornography, Contraband, Abuse, Advertisement, Custom, or Normal.
    • Matching mode: original text matching.
    • Description: description of the word dictionary.

    The dictionary name cannot be changed.

  4. After the keyword is created, click Manage in the Operation column on the list page to add a keyword. You can add multiple keywords by pressing Enter. Each keyword occupies a line. A blocklist directory supports a combination of words separated by ampersands (&), for example, "contact me" matches "contact" and "me".
    Figure 2 Add a keyword:

Modifying or Deleting a Custom Dictionary

Modifying or Deleting a Custom Dictionary

  1. Log in to the Content Moderation management console.
  2. In the navigation pane, choose Content Moderation V3 > Custom Dictionary.
    • Locate a dictionary and click Modify in the Operation column. In the displayed dialog box, modify the keywords and click OK.
    • Locate a dictionary and click Delete in the Operation column. In the displayed dialog box, click OK.

Deleted policies cannot be recovered. Exercise caution when performing this operation.