MCPcopy Create free account
hub / github.com/comaps/comaps / UpdateNameScores

Function UpdateNameScores

libs/search/ranker.cpp:57–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55{
56template <typename Slice>
57void UpdateNameScores(string_view name, uint8_t lang, Slice const & slice, NameScores & bestScores)
58{
59 if (localisation::IsAlternativeOrOldName(lang))
60 strings::Tokenize(name, ";", [&](string_view n) { bestScores.UpdateIfBetter(GetNameScores(n, lang, slice)); });
61 else
62 bestScores.UpdateIfBetter(GetNameScores(name, lang, slice));
63}
64
65template <typename Slice>
66void UpdateNameScores(TokensVector & tokens, uint8_t lang, Slice const & slice, NameScores & bestScores)

Callers 1

GetNameScoresFunction · 0.85

Calls 4

IsAlternativeOrOldNameFunction · 0.85
UpdateIfBetterMethod · 0.80
TokenizeFunction · 0.70
GetNameScoresFunction · 0.70

Tested by

no test coverage detected