marisa

Fast trie data structure library for string matching and lookup

brewmacoslinux
Try with needOr install directly
Source

About

Matching Algorithm with Recursively Implemented StorAge

Commands

marisa-buildmarisa-lookupmarisa-reverse-lookup

Examples

Build a MARISA trie from a newline-separated list of keys$ marisa-build -o output.marisa keys.txt
Look up keys in a compiled MARISA trie$ marisa-lookup output.marisa < queries.txt
Perform reverse lookup (find all keys matching a pattern)$ marisa-reverse-lookup output.marisa prefix*