fuzzywuzzy-rs icon indicating copy to clipboard operation
fuzzywuzzy-rs copied to clipboard

process::extract_without_order must avoid re-invoking processor methods

Open seanpianka opened this issue 3 years ago • 4 comments

See the original implementation where the processor function is only executed once if it's a known method.

I'm not sure if this is an optimization to prevent duplicate calls, or if multiple invocations could lead to some undesired state? i.e. the processor function is not idempotent.

seanpianka avatar Sep 16 '20 07:09 seanpianka

wratio -> wratio and wratio_calc like ratio_full and simple_calc

same with partial_ratio_full for that matter

logannc avatar Mar 27 '21 04:03 logannc

basically the current impl of extract_without_order doesn't double call the processors, but if the scorer calls processing, you're hosed. It just so happens the original scorers by default do because we havent split them out as concepts.

logannc avatar Mar 27 '21 04:03 logannc

Does #28 split them out as concepts?

seanpianka avatar Mar 28 '21 01:03 seanpianka

not quite, no. You have things like ratio_full which does processor and delegates to simple_ratio which could be considered a scorer, but that structure is not applied to, say, partial_ratio_full which would need to split out most of its body into a best_partial_ratio or something.

logannc avatar Mar 28 '21 01:03 logannc