Skip to content

Conversation

@rolandwalker
Copy link
Contributor

@rolandwalker rolandwalker commented Jan 21, 2026

Description

  • Don't attempt true fuzzy matches until the given text is 4+ characters.
  • Require a rapidfuzz WRatio score of 80+ 75+.
  • Limit rapidfuzz candidates to 20 or fewer.
  • Don't report rapidfuzz candidates which are much shorter than the given text.

Example:
last image

Checklist

  • I've added this contribution to the changelog.md.
  • I've added my name to the AUTHORS file (or it's already there).
  • I ran uv run ruff check && uv run ruff format && uv run mypy --install-types . to lint and format the code.

@rolandwalker rolandwalker self-assigned this Jan 21, 2026
@rolandwalker rolandwalker force-pushed the RW/true-fuzzy-completions branch from 884a9c3 to 854e7df Compare January 21, 2026 15:29
@scottnemes
Copy link
Contributor

Could you provide some more examples showing the difference? The JON_V example acts the same on main, so wanting to test out some additional examples to see how it works.

@rolandwalker
Copy link
Contributor Author

Oh, right. Try JZON_VAL.

@rolandwalker rolandwalker force-pushed the RW/true-fuzzy-completions branch from 854e7df to a63177e Compare January 22, 2026 10:40
@rolandwalker
Copy link
Contributor Author

JZON_VAL actually doesn't match. The thresholds might need some tuning. This one does:

last image

@rolandwalker rolandwalker force-pushed the RW/true-fuzzy-completions branch from a63177e to 405edad Compare January 22, 2026 12:22
@rolandwalker
Copy link
Contributor Author

Lowering score_cutoff=80 to 75 lets JZON_VAL match so I made that update.

 * don't attempt true fuzzy matches until the given text is 4+
   characters
 * require a rapidfuzz WRatio score of 75+
 * limit rapidfuzz candidates to 20 or fewer
 * don't report rapidfuzz candidates which are much shorter than the
   given text
@rolandwalker rolandwalker force-pushed the RW/true-fuzzy-completions branch from 405edad to fb6371e Compare January 22, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants