[issue21344] save scores or ratios in difflib get_close_matches

Russell Ballestrini report at bugs.python.org
Fri Apr 25 06:05:34 CEST 2014


Russell Ballestrini added the comment:

At some point I plan to write a web API that accepts a word, 'doge' and returns a list of possible suggestions and scores.  Later a "did you mean dog" style suggestion could be implemented on top.

We compute the scores, and it is computationally taxing, we shouldn't always throw this data away.  Most users will continue to use get_close_matches, some users might want to build indexes on the scores.  

Other users may want to cache (memonize) common queries for super fast look ups.  Additionally the new function will give end-users the opportunity to inspect the scoring algos output.

I prefer to use the same arg spec because it is already widely understood and documented.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21344>
_______________________________________


More information about the Python-bugs-list mailing list