This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Rewrite scoring algorithm to support run of consecutive character, fix acronyms and add optimal selection of character. #22
Closed
Closed
Changes from 3 commits
Commits
Show all changes
77 commits
Select commit
Hold shift + click to select a range
9511715
Updated scoring algorithm, and merged @plrenaudin filter spec
jeancroy bc509dd
Removed SlahCount from baseNameScore (Test if this is source of diffe…
jeancroy b3d47c5
Increased BasePath bonus
jeancroy 82dfcc3
Increase exact match bonus if happens right after a separator
jeancroy f779333
Introduce concept of optional characters, for example space can be ma…
jeancroy 7539792
Added test for issue
jeancroy 7c7f5d1
Added back preference for shallower path. (got removed after first bu…
jeancroy 0e2c1a4
Compute lowercase once (thnaks to @walles)
jeancroy 6dd4eaa
Last refactoring permit to drop -Infinity value and remove one test c…
jeancroy d2eb476
re-use precomputed lowercase
jeancroy 09aa694
corrected math for lpos, in the suffix bonus case.
jeancroy 6b44306
case sensitive exact match is now a bypass
jeancroy 957da9b
Improved accuracy for CamelCase
jeancroy dec3278
account for case in CamelCase vs Substring matches
jeancroy 67a0a0e
CamelCase Matches now prefer smaller haystack, matches that happens s…
jeancroy 4290552
More robust basePath score
jeancroy 8d1d713
Added more real-life test cases
jeancroy 25d7b3c
Adjusted some weight so close call test have more legroom
jeancroy ab040aa
Query that have slashes also get bonus for matching base file.
jeancroy 9ab128c
fix some comments
jeancroy e0ff69b
Merge remote-tracking branch 'origin/master'
jeancroy 28f2248
Now using improved scorer to do aligments (matches)
jeancroy 2c011a9
Option to allow error in query, disabled by default.
jeancroy 8f42f93
Updated match to mirror behavior of filter
jeancroy 99d3237
rework sequence merging (basePath, completePath) in match method
jeancroy 8196b5e
added some mid difficulty highlight test case
jeancroy e811fa4
Introduce knowledge of consecutive characters in both match and the c…
jeancroy d6c2882
Implemented forward search for the number of consecutive chars.
jeancroy fa66d51
Improve Match:
jeancroy f0c492f
corrected exit condition of perfect camelCase match to account for ha…
jeancroy a862b89
added test for case-sensitive exact matches.
jeancroy e3c0fff
added test case to ensure correct result event in the non-exact subst…
jeancroy ba5d196
with the introduction of bonus relative to the number of consecutive …
jeancroy 616346e
Remove un-needed (since last change) gap tracking variables
jeancroy 03727bf
Merge branch 'after22'
jeancroy 4b9550e
Merge remote-tracking branch 'origin/master'
jeancroy f9197a3
Merge highlight (match) feature using improved scoring algorithm.
jeancroy 329e7c1
make score() follow filter() behavior more closely
jeancroy beee187
clean-up, fix comments
jeancroy c06cc8f
added more non-exact (fuzzy) test.
jeancroy cf8a43d
Replace test by an easier one for now.
jeancroy da12540
unified handling of snake_case and CamelCase.
jeancroy be99411
faster exit condition abbrPrefix
jeancroy 1908a56
Faster abbrPrefix
jeancroy 39e92f7
Bring back string_score as an optional faster but less accurate algor…
jeancroy e163e38
Speed: Math.max with 3 args is slow - use ternary, ternary
jeancroy 1376514
Speed: use Object for multiple return value of abbrPrefix a bit faste…
jeancroy 8993e06
Cleaner definition of sepmap
jeancroy 93d283c
Show worst case scenario in benchmark
jeancroy 0987c51
One extra test case needed to explain speed behavior
jeancroy 8ac9178
show acronym quick exit in benchmark
jeancroy f129adc
Propose Worst case mitigation strategy
jeancroy b7c2422
Added a setting to control of the length subject considered for the s…
jeancroy 7a063b4
Improve scoring of a match neighborhood quality.
jeancroy cb15663
remove the +1 offset between score and string position
jeancroy f47fc76
More uniform naming, use less memory
jeancroy 0fcc59d
Merge pull request #2 from jeancroy/structural_change
jeancroy af723ee
Code review, missed one switch i<->j
jeancroy 8bf3f60
"Worser" worst case scenario in benchmark
jeancroy 99a8a3b
Strip space and space like character in score() and match() to mirror…
jeancroy 887a577
test case for https://github.com/substantial/atomfiles/issues/43
jeancroy 753c6c7
simplification:
jeancroy e6f103b
Faster test for Case-Sensitive Exact match
jeancroy a14bb8d
compute lowercase() upfront, enable mitigation by default
jeancroy da72fa9
when queryHasSlashes, basepath contain as many folder as query, start…
jeancroy 98af35f
Clarify behavior of filter() on empty string or empty array
jeancroy a0099df
Added test for Suffix feature of exact match
jeancroy 1cb9ce8
Allow to interchange forward and backward slashes in query.
jeancroy 6cd2b3f
Prepare for review / V3
jeancroy 46c8d2b
Corrected a bug with isMatch, reworked acronym weigth
jeancroy 2f56dcb
Scoring improvement for single character query.
jeancroy 8086648
Scoring improvement for single character query.
jeancroy 2ba093a
Speed: Hit Count Optimisation & various improvements
jeancroy 00ccd02
Delay computing candidate lowercase until IsMatch confirmed.
jeancroy f7cd989
faster end condition for scoreAcronyms
jeancroy a67fe76
clean up around scoreAcronyms added a new benchmark case
jeancroy 149d937
fix indentation
jeancroy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Settings View: View Installed Themes
is missing from this list.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, because current ranking was not optimal so I did not wanted to set current ranking as spec.
On the other side if I place "optimal" ranking as per @plrenaudin the build will fail...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand there's no "nice to have" spec, it's pass all or the build fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pity.
But even without that this version of the patch is still an improvement over the current situation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :) Added support for your usecase in both spec and scoring (implemented as an extra bonus if exact match happens rigth after token separator)