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

Function GetScore

libs/search/search_tests/ranking_tests.cpp:28–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26namespace
27{
28NameScores GetScore(string const & name, string const & query)
29{
30 Delimiters delims;
31 QueryParams params;
32
33 auto const tokens = NormalizeAndTokenizeString(query);
34
35 params.Init(query, tokens, !query.empty() && !delims(strings::LastUniChar(query)));
36
37 return GetNameScores(name, localisation::kDefaultNameIndex, TokenSlice(params, {0, tokens.size()}));
38}
39
40void AssignRankingInfo(NameScores const & scores, RankingInfo & info, size_t totalLength)
41{

Callers 3

operator>Method · 0.85
operator<Method · 0.85
UNIT_TESTFunction · 0.85

Calls 7

LastUniCharFunction · 0.85
GetNameScoresFunction · 0.50
TokenSliceClass · 0.50
InitMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected