Skip to content

raineszm/actrie

Repository files navigation

AcTrie

This library provides a naive implementation of as the Aho-Corasick algorithm for string searching as well as a simple implementation of a compressed radix trie.

Usage

Trie

The Trie module defines a compressed radix tree mapping string keys to a generic value. This class implements the IDictionary<string, TValue> interface. Additionally it implements the ConsumeLongestPrefix method, which returns the value corresponding to the key matching the longest prefix as well as the remaining text.

AcTrie

The AcTrie module defines an AcTrie class implementing the IDictionary interface, generic over the key and value. Additionally AcTrie implements an Aho-Corasick state machine. This functionality is used to provide the Search and LongestMatch methods.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

a simple implementation of the Aho-Corasick algorithm in C#

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages