Configuring morphology

To create a morphology list, use the following command:

Admin@nodename# create libraries morphology <parameter>

Specify the following parameters:

Parameter

Description

name

Morphology list name.

description

List description.

threat-lvl

Threat level:

  • very-low: very low threat level

  • low: low threat level

  • medium: medium threat level

  • high: high threat level

  • very-high: very high threat level.

threshold

Morphology category weight, which needs to be exceeded for the rule to be triggered.

type

List type:

  • local: local

  • updatable: if the list is updatable, specify URL address for downloading updates (url). List update frequency is set by the schedule parameter in the crontab format.

Crontab format: (minutes: 0-59) (hours: 0-23) (days of the month: 1-31) (month: 1-12) (days of the week: 0-6; where 0 is Sunday). You can set each field as follows:

  • An asterisk (*) denotes the entire range (from the first number to the last).

  • A dash (-) denotes a number range. For example, "5-7" means 5, 6, and 7.

  • Lists: comma-separated numbers or ranges. For example, "1,5,10,11" or "1-11,19-23".

  • An asterisk or range spacing: used for spacing out values in ranges. The increment is given after a slash. Examples: "2-10/2" means "2,4,6,8,10" while "*/2" in the "hours" field means "every two hours".

words

Words and phrases to add to the list.

  • word: words and phrases. When adding a word to the morphological dictionary, you can precede it with the "!" modifier, such as "!bassterd". In that case, the slang word will not be converted to word forms, which can dramatically reduce the probability of erroneous blocking.

  • weight: word or phrase weight. If not set, the default value of 100 is used.

To add words and phrases, use the following command:

Admin@nodename# create libraries morphology ... words new word "word or phrase" weight <weight>

To edit the list, use the following command:

Admin@nodename# set libraries morphology <morphology-list-name> <parameter>

Specify the parameters for which the values will be updated. The parameters are listed in the table above. To add new words or phrases to a list, use the following command:

Admin@nodename# set libraries morphology <morphology-list-name> words new word "word or phrase" weight <weight>

To replace a word in a list, use the following command:

Admin@nodename# set libraries morphology <morphology-list-name> words ( word "old word or phrase" weight <weight> ) word "new word or phrase" weight <weight>

To delete an entire morphology list or words from it, use the following commands:

Admin@nodename# delete libraries morphology <morphology-list-name> Admin@nodename# delete libraries morphology <morphology-list-name> words ( word "word or phrase" weight <weight> )

To display information about all existing morphology lists, use the following command:

Admin@nodename# show libraries morphology

To display information about an individual morphology list, append the list name. To display a morphology list, use the following command:

Admin@nodename# show libraries morphology <morphology-list-name> words