diff options
author | Yuri Gorshenin <y@maps.me> | 2017-08-31 19:24:33 +0300 |
---|---|---|
committer | mpimenov <mpimenov@users.noreply.github.com> | 2017-09-04 16:06:47 +0300 |
commit | ef8f9b155eace440038a87df7768d7b13ca8a5d8 (patch) | |
tree | c2c81d31468fe12538050a0bc3bcb359fd7fe220 /search/utils.cpp | |
parent | 941ec78f1fd9fa492c634118ae126a431f7d18d1 (diff) |
[search] Expose num typos to ranking info.
Diffstat (limited to 'search/utils.cpp')
-rw-r--r-- | search/utils.cpp | 5 |
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 |