trrex: efficient keyword mining with regular expressions#
The package includes a function that represents a collection of keywords (strings) as a regular expression. This regular expression can be used for multiple purposes, such as keyword replacement, keyword extraction, fuzzy matching, and other similar tasks.
In : import re In : import trrex as tx In : pattern = tx.make(["baby", "bat", "bad"]) In : re.findall(pattern, "The baby was scared by the bad bat.") Out: ['baby', 'bad', 'bat']