trrex: Efficient keyword extraction with regex

This package contains a function for efficiently representing a set of keywords as regex. This regex can be used to replace keywords in sentences or extract keywords from sentences.

In [1]: import re

In [2]: import trrex as tx

In [3]: pattern = tx.make(["baby", "bat", "bad"])

In [4]: re.findall(pattern, "The baby was scared by the bad bat.")
Out[4]: ['baby', 'bad', 'bat']


Getting Started

User Guide

Help & Reference