Skip to content
Commit 00e45463 authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Improve fuzzy matching

This is another series of small fuzzy improvements
- Sequential bonuses starting from a separator match are slightly
adjusted so that they are not too far behind a bonus resulting from
a match at the start of string. This helps in bumping up a result
if the file was open for e.g.,

- Introduction of gap penalty. Gap penalty is applied in two ways.
1. If the gap is between two separators, the penalty is higher and
cancels out the bonus if the gap is >= 9 chars
2. For a normal gap, penalty is -1 * gap length
This helps in making the algorithm more "fuzzy" and less "acronym-y".

Sequential bonuses starting randomly are increased with each subsequent
matching letter. On a mismatch the bonus value is reset to 10. Applying
this bonus correctly is crucial as otherwise it can render the
recursive best matching useless.
parent 308050eb
Pipeline #240195 passed with stage
in 10 minutes and 6 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment