big-brain icon indicating copy to clipboard operation
big-brain copied to clipboard

Allow custom scorers to be created

Open will-hart opened this issue 1 year ago • 2 comments

Currently it isn't possible to create custom scorers as Score and ScoreEnt are pub(crate). This PR makes these pub so that custom scorers can be built.

will-hart avatar Sep 18 '22 10:09 will-hart

Ah good point, I was following SumOfScorers as an example which accesses score.0 directly. I'll revert the change.

Are you open to PRs for other Picker / Scorer types? Or would you prefer they stay as user code? I've created a ProductOfScorers and MaxScore picker

will-hart avatar Sep 18 '22 21:09 will-hart

I'm definitely open to other general-use compound scorers and pickers :)

zkat avatar Sep 18 '22 22:09 zkat

Ok, I've updated the PR - as a bonus it made the PR 50% easier to review 🤣

I've spotted #48 which is the Picker I wanted to add. I'll create a separate PR with the compound scorer

will-hart avatar Sep 19 '22 08:09 will-hart