|
libosmscout 0.1
|
Matches like StringMatcherTransliterate and, in addition, matches the pattern's consecutive words against a consecutive run of the candidate's words, so a candidate whose name joins words with a separator is found by a pattern that spells those words apart (and the other way round). More...
#include <StringMatcher.h>
Inheritance diagram for osmscout::StringMatcherTransliterateToken:Public Member Functions | |
| Result | Match (const std::string &text) const override |
| StringMatcherTransliterateToken (const std::string &pattern) | |
Public Member Functions inherited from osmscout::StringMatcher | |
| virtual | ~StringMatcher ()=default |
Additional Inherited Members | |
Public Types inherited from osmscout::StringMatcher | |
| enum | Result { noMatch , partialMatch , match } |
Matches like StringMatcherTransliterate and, in addition, matches the pattern's consecutive words against a consecutive run of the candidate's words, so a candidate whose name joins words with a separator is found by a pattern that spells those words apart (and the other way round).
Separators are whitespace, comma, hyphen, slash, backslash and the en/em dash. Only a run of words that appears in the candidate in the same order as in the pattern matches; a pattern whose words are reordered, or interrupted by a candidate word the pattern does not carry, does not match by this rule. A run covering the whole candidate is reported as match, a run covering only part of it as partialMatch.
The transliterating substring match is evaluated first and its result is returned unchanged, so this matcher only adds matches; it never removes one and never reports a different quality for an existing match.
|
explicit |
References osmscout::UTF8StringToUpper(), and osmscout::UTF8Transliterate().
|
overridevirtual |