Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests and out of bounds in scorer #34576

Merged
merged 3 commits into from
Sep 19, 2017
Merged

Conversation

keegancsmith
Copy link
Contributor

See the commit messages for details.

This test was a noop, because sort sorted `scores` as well. After this change,
the test fails. It passes after the following changes:

* hw should be a higher score than just H, since the w appears after a word
  separator.
* Same with ld and L.
* Change target so that L comes before l. The scorer algorithm is greedy, so
  will not match the upper case L otherwise, which is the point of that specific
  case.
`indexOf` is the index into `target`, while `index` is the correct index into
`query`.
@keegancsmith
Copy link
Contributor Author

I noticed a simple performance improvement as well, which I also just pushed into this PR.

@bpasero bpasero merged commit 88ed834 into microsoft:master Sep 19, 2017
@bpasero
Copy link
Member

bpasero commented Sep 19, 2017

@keegancsmith nice findings, thanks 👍

@bpasero bpasero added this to the September 2017 milestone Sep 19, 2017
@keegancsmith keegancsmith deleted the scorer branch September 19, 2017 10:43
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants