[issue21344] save scores or ratios in difflib get_close_matches
Russell Ballestrini
report at bugs.python.org
Sat Apr 26 00:18:28 CEST 2014
Russell Ballestrini added the comment:
Tim,
You bring up some great points and insight I was missing.
"To me the scores just aren't interesting beyond which words' scores exceed a cutoff, and the ordering of words based on their similarity scores - but `get_close_matches()` already captures those uses."
For a *word*, and a corpus of *possibilities*, how does one choose a satisfactory *cutoff* without inspecting the output of the scoring algorithm?
Personally, I don't want to inpect scores for inspection sake, I want to inspect scores so I can make an informed decision for the *n* and *cutoff* input arguments.
Its true that after reading and digesting the source code for `get_close_matches()` I could (and did) implement a version that returns scores. My goal was to share this code and what better way then to "fix" the problem upstream.
I understand the desire to keep the standard library lean and useful to reduce the amount of burden the code is to maintain. I will understand if we decide not to include these patches, I can always maintain a fork and share on pypi.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21344>
_______________________________________
More information about the Python-bugs-list
mailing list