Make FuzzyMatcher more convenient to use#1583
Conversation
|
If we're removing methods which return an |
|
I actually considered removing the scoring logic, but it's still a pretty quick operation and I thought some future features may involve sorting by score. I think leaving it in would be fine; they'll just have to use the longer variant: haystack.FuzzyMatches("needle", Mode.FuzzyParts, CultureInfo.InvariantCulture, out var score) |
|
Oh, my mistake, we do still keep |
|
Additional thoughts: if we're to implement features to add localized names for plugins, CJK in particular can use extra fuzzy matching which would justify the use of precalculated data for fuzzy matching, such as precalculating which qwerty key sequence is equivalent to producing IME-processed characters. But I don't see that happening anytime soon, so that can be considered way later. |
|
I think score is useful, I personally struggle to use it though because it doesn't really have any definition or description. I think it might be more useful if it was either defined what the values mean, or if it was converted into a float to represent %match or something along those lines. |
|
@Soreepeong please rebase against api13 |
85fb98e to
6ad43b8
Compare
|
Rebased. |
Removed the requirements to accommodate
ref structfrom the invoker code. Can be used as an extension method, with the shortest form ofhaystack.FuzzyMatchesParts(needle).