| 304 | } |
| 305 | |
| 306 | bool FeatureParams::LooksLikeHouseNumber(std::string const & hn) |
| 307 | { |
| 308 | // Very naive implementation to _lightly_ promote hn -> name (for search index) if suitable. |
| 309 | /// @todo Conform with search::LooksLikeHouseNumber. |
| 310 | |
| 311 | ASSERT(!hn.empty(), ()); |
| 312 | size_t const sz = hn.size(); |
| 313 | return strings::IsASCIIDigit(hn[0]) || (sz == 1 && strings::IsASCIILatin(hn[0])) || |
| 314 | std::count_if(hn.begin(), hn.end(), &strings::IsASCIIDigit) > 0.2 * sz; |
| 315 | } |
| 316 | |
| 317 | char const * FeatureParams::kHNLogTag = "HNLog"; |
| 318 |
nothing calls this directly
no test coverage detected