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.
- If the gap is between two separators, the penalty is higher and cancels out the bonus if the gap is >= 9 chars
- 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.