minor refactor
pre-compile the regexps
fix `get_function_from_rule()`
don't pass any context to the evaluated code
pre-compile the plural functions
fix `get_text()` and make it log exceptions