luillo1 / RaceResults

A platform for managing and sharing running race results within running groups
4 stars 0 forks source link

Refactor Scorer.cs to Use ProbabilityProvider class #35

Open satvu opened 2 years ago

satvu commented 2 years ago

ProbabilityProvider was added to access the probability of a name which is used in Scorer.

Scorer currently has initialization methods that take in a tsv file or dictionary and uses that info to get name probability.

satvu commented 2 years ago

@CarlKCarlK would this work for you? @luillo1 said he added your file of name probabilities to cosmosdb already and you can grab them using this.

We'd need to add something to return the default value you had previously if the name isn't found in our database. We can wait for your other PR before refactoring with this, but any initial thoughts?

CarlKCarlK commented 2 years ago

Looks good. It would be fine for missing names to just return null (or something similar). That would make it easier to tune the default value later.