text
text copied to clipboard
Use union regex for basic_english
Create a single union regular expression that uses a lambda to query a dictionary of patterns for the correct replacement. This causes a significant speedup, however is different from the current behavior where the substitutions are applied consecutively instead of in parallel all at once. We might want to hide this behavior behind a flag, but it is useful and can yield significantly faster code.