phrase
ARES System Manual: filter Text Filter Utilities

filter phrase <flags>: Performs phrase substitutions on the input stream; capitalization must match exactly.
vox <chain> phrase remove: Removes this filter from the specified vox pipeline <chain>.
vox <chain> phrase <flags>: Adds this filter to the vox pipeline <chain>, with the specified <flags>. If it is already present, the current <flags> will be updated.
(chat filtering... > <chain> filters... > phrase > activate or configure): values input here are passed to vox <chain> phrase.

As with other chat filters, it is only appropriate to call filter directly when manually using a pipe to modify text. Most users should instead interface with it via the vox command or chat filtering menu, which manages automatic modification of chat.


Flags

Specify the subkey of phrase within the filter database section which contains an associative array (JSON object) of phrases to substitute.

By default, the database includes one list of phrase substitutions, soap.

An owner can create a new list of phrases with a command such as

    @db filter.phrase.unit ["I am ","This unit is ","I ","This unit "," me"," this unit"," my ", " this unit's ","My ","This unit's "]

which can then be selected with filter phrase unit, vox <chain> phrase unit, or entering phrase into the activate or configure chat filtering menu, as appropriate.

See db for more information on creating database entries.


Order of Operations

phrase is a layer 0 (semantic) filter. When used in a vox chain, it will be applied to the text before any filters of a higher layer.


Limitations

Since the phrase filter does NOT perform any sort of word boundary separation, it may take several entries to successfully substitute short terms. The sample given above may produce undesirable capitalization when replacing 'I', for example.

During substitution, the character ^ is temporarily prefixed to the start of the string and $ is temporarily suffixed to the end of the string to help with targetting these positions.

The phrase filter can parse entries from either a JSON object or JSON array, but the latter is recommended as it will grant control over order-of-operations.