Multiple suggestions and estimations of confidence
rafis opened this issue · 0 comments
rafis commented
The spell()
function returns only single value that is the corrected word. Can you please add another function which returns two values (word, confidence)
where confidence is percentage score from 0.0 to 1.0 showing how system confident what the provided word was misspelled. Also maybe it is good to provide multiple suggestions and confidence level for each of them, for example,
> spell_scores('pinrt')
[('print', 0.9), ('pint', 0.7)]
Currently autocorrect understands this typo in "pinrt" incorrectly.