[go: nahoru, domu]

tree: 7c6fba75db183197f85dc122a5fa6ac45334c9f4 [path history] [tgz]
  1. acronym_matcher.cc
  2. acronym_matcher.h
  3. acronym_matcher_unittest.cc
  4. BUILD.gn
  5. DEPS
  6. diacritic_utils.cc
  7. diacritic_utils.h
  8. diacritic_utils_unittest.cc
  9. fuzzy_tokenized_string_match.cc
  10. fuzzy_tokenized_string_match.h
  11. fuzzy_tokenized_string_match_unittest.cc
  12. OWNERS
  13. prefix_matcher.cc
  14. prefix_matcher.h
  15. prefix_matcher_unittest.cc
  16. README.md
  17. sequence_matcher.cc
  18. sequence_matcher.h
  19. sequence_matcher_unittest.cc
  20. term_break_iterator.cc
  21. term_break_iterator.h
  22. term_break_iterator_unittest.cc
  23. tokenized_string.cc
  24. tokenized_string.h
  25. tokenized_string_char_iterator.cc
  26. tokenized_string_char_iterator.h
  27. tokenized_string_char_iterator_unittest.cc
  28. tokenized_string_fuzzer.cc
  29. tokenized_string_match.cc
  30. tokenized_string_match.h
  31. tokenized_string_match_unittest.cc
  32. tokenized_string_unittest.cc
chromeos/ash/components/string_matching/README.md

About

This Chrome OS string matching library provides functionality to compute the similarity scores between two given strings.

This library's main use is within the launcher backend ranking system (chrome/browser/ash/app_list/search/).

The entry points to this library are via either:

  1. FuzzyTokenizedStringMatch
    • For fuzzy matching.
  2. TokenizedStringMatch
    • For non-fuzzy matching.

Testing

The FuzzyTokenizedStringMatch class is complex and evolving. As such, we do not currently enforce many specific and strict scoring requirements for sample query-text pairs. However, there are tests which optionally log detailed scoring output for manual inspection.

If making changes to fuzzy string matching functionality, please inspect the benchmarking unit tests with verbose logging enabled. Steps:

Add to gn args:

# For building tests.
target_os = "chromeos"

Build and run tests, e.g.:

autoninja -C out/Default chromeos_unittests && out/Default/chromeos_unittests --gtest_filter="*FuzzyTokenizedStringMatchTest.Benchmark*" --v=1