Skip to content
/ trimatch Public

Trimatch: An (Exact|Prefix|Approximate) String Matching Library

License

Notifications You must be signed in to change notification settings

tuem/trimatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trimatch: Trie-based (Exact|Predictive|Approximate) String Matching Library

Usage

  1. Add include and external/stfrie/include to your include path

  2. Include header

#include <trimatch/index.hpp>
  1. Build index
std::vector<std::string> texts; // you can also use u16string, u32string, etc.
...
auto index = trimatch::set::build(texts);
  1. Search texts
std::string query = "...";
auto searcher = index.searcher();

for(const auto& [text, distance]: searcher.approx(query))
	std::cout << "text=" << text << ", distance=" << distance << std::endl;

About

Trimatch: An (Exact|Prefix|Approximate) String Matching Library

Resources

License

Stars

Watchers

Forks

Packages

No packages published