Skip to content

Improve fuzzy matching

Waqar Ahmed requested to merge work/fuzzy-imps into master

This change includes a few improvements (hopefully) to the fuzzy algorithm which are as follows:

  1. Dont apply a leading letter penalty by default on everything. Leading letter penalty is applied whenever there is a few letters at the beginning of a string that dont match. Now it is only applied if we didn't match
  • start of the string
  • any other special position e.g., camel hump
  1. If the first matched letter is a special match i.e., camel hump or separator, extra points are given

  2. Sequences that begin from a special match are scored higher.

  3. Penalty will be applied whenever there is a gap between two matched letters. This might need some more tuning but so far its working

Merge request reports