rflynn / regroup

Generate a regular expression that describes a set of strings.
MIT License
29 stars 7 forks source link

improve DAWG suffix collapse #1

Open rflynn opened 8 years ago

rflynn commented 8 years ago

collapse shared suffixes and substrings

e.g.

input: [bat, brat, cat]
now: (br?at|cat)
dawg: (br?|c)at

ref: https://github.com/rflynn/regroup/blob/master/tests/test_init.py#L41