
Approximate Regex Matching in Python - coderdude
http://hackerboss.com/approximate-regex-matching-in-python/
======
rplnt
Another approximate matching library is FuzzyWuzzy[1]. It has some handy
functions and seems easier to use. Although might not be as powerful as this.

1\. <https://github.com/seatgeek/fuzzywuzzy>

~~~
schwa
Bonus points for the racist project name too.

~~~
coderdude
If you're English, which they're not.

~~~
rcfox
English is my first language, and I have no idea of what he's talking about.

~~~
burgerbrain
<http://www.urbandictionary.com/define.php?term=fuzzy%20wuzzy>

Strictly an English thing.

------
Wilduck
This is really cool, but I'm curious what the performance implications are
when doing fuzzy matching? I noticed that the list of types of errors did not
include transposition. I wonder if the reason for this comes down to
performance/technical reasons.

~~~
coderdude
The author wrote more about the library here:
<http://laurikari.net/tre/about/>

He talks about the time complexity ("O(M^2N), where M is the length of the
regular expression and N is the length of the text"), and he talks more about
it under "Predictable matching speed." It doesn't look like he talks about how
the fuzziness feature affects that but I could have missed it.

~~~
Wilduck
Wow, I'm glad you linked to that article, otherwise I would have thought the
complexity was O(M^(2N)) instead of O((M^2)N). Although, the fact that I
almost mistook that complexity means I should probably spend some time
learning about how regular expressions are implemented. Thanks for the link.

~~~
burgerbrain
O(M^(2N)) would get absolutely ludicrous pretty damn quick.

