Skip to content
  • Waqar Ahmed's avatar
    Improve fuzzy matching · f780dd10
    Waqar Ahmed authored and Christoph Cullmann's avatar Christoph Cullmann committed
    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
    
    2. If the first matched letter is a special match i.e., camel hump or
    separator, extra points are given
    
    3. Sequences that begin from a special match are scored higher.
    
    4. Penalty will be applied whenever there is a gap between two
    matched letters. This might need some more tuning but so far its working
    f780dd10