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>2017-08-31 19:24:33 +0300
committermpimenov <mpimenov@users.noreply.github.com>2017-09-04 16:06:47 +0300
commitef8f9b155eace440038a87df7768d7b13ca8a5d8 (patch)
treec2c81d31468fe12538050a0bc3bcb359fd7fe220 /search/utils.cpp
parent941ec78f1fd9fa492c634118ae126a431f7d18d1 (diff)
[search] Expose num typos to ranking info.
Diffstat (limited to 'search/utils.cpp')
-rw-r--r--search/utils.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/search/utils.cpp b/search/utils.cpp
index c584dc9d30..18caccfa58 100644
--- a/search/utils.cpp
+++ b/search/utils.cpp
@@ -15,4 +15,9 @@ size_t GetMaxErrorsForToken(strings::UniString const & token)
return 1;
return 2;
}
+
+strings::LevenshteinDFA BuildLevenshteinDFA(strings::UniString const & s)
+{
+ return strings::LevenshteinDFA(s, 1 /* prefixCharsToKeep */, GetMaxErrorsForToken(s));
+}
} // namespace search