Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Gorshenin <y@maps.me>2016-06-17 15:17:15 +0300
committerYuri Gorshenin <y@maps.me>2016-06-17 17:23:31 +0300
commit6334404df5a5133c81d24932d4683ac2069864d3 (patch)
treefc2bacaa93c3bdafbf7842be23406dadbdb4d870 /indexer/search_string_utils.hpp
parent683250079ac00a81920ed9cc101239cee4ed2f9c (diff)
Review fixes.
Diffstat (limited to 'indexer/search_string_utils.hpp')
-rw-r--r--indexer/search_string_utils.hpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/indexer/search_string_utils.hpp b/indexer/search_string_utils.hpp
index 46d93208cb..d8f8af579f 100644
--- a/indexer/search_string_utils.hpp
+++ b/indexer/search_string_utils.hpp
@@ -57,7 +57,10 @@ bool ContainsNormalized(string const & str, string const & substr);
// This class can be used as a filter for street tokens. As there can
// be street synonyms in the street name, single street synonym is
-// skipped, but multiple synonyms are left as is.
+// skipped, but multiple synonyms are left as is. For example, when
+// applied to ["улица", "ленина"] the filter must emit only
+// ["ленина"], but when applied to ["улица", "набережная"] the filter
+// must emit both tokens as is, i.e. ["улица", "набережная"].
class StreetTokensFilter
{
public:
@@ -70,10 +73,10 @@ public:
}
// Puts token to the filter. Filter checks following cases:
- // * if |token| is the first street synonym met so far, it's delayed
- // * if |token| is a street synonym, but not the first, callback is called
- // for the |token| and for the previously delayed token
- // * if |token| is not a street synonym, callback is called for the |token|
+ // * when |token| is the first street synonym met so far, it's delayed
+ // * when |token| is the second street synonym met so far,
+ // callback is called for the |token| and for the previously delayed token
+ // * otherwise, callback is called for the |token|
void Put(strings::UniString const & token, bool isPrefix, size_t tag);
private: