roy-ht / editdistance

Fast implementation of the edit distance(Levenshtein distance)
MIT License
661 stars 62 forks source link

Feature: set a limit if distance greater than N , stop #21

Open leobenkel opened 6 years ago

leobenkel commented 6 years ago

Would be great to have editdistance.eval(a, b, limit=5) if the result would be > 5 then it returns None

dequeued0 commented 1 year ago

This would be a great feature, especially if it helps reduce the cost of comparing two texts that are significantly different for applications where the goal is determining whether two texts are similar or not and when knowing the distance is only important for small distances.