Skip to main content

Module custom_rules

Module custom_rules 

Source
Expand description

Custom user-defined normalization rules.

Allows callers to register spoken→written mappings at runtime. These rules are checked with the highest priority in sentence mode, before any built-in taggers.

Example: (“linux”, “Linux”), (“gee pee tee”, “GPT”)

Functions§

add_rule
Add a custom spoken→written mapping.
clear_rules
Clear all custom rules.
parse
Try to match input against custom rules (exact match, case-insensitive).
remove_rule
Remove a custom rule by its spoken form.
rule_count
Get the number of custom rules currently registered.