NReco.Text.AhoCorasickDoubleArrayTrie 1.0.2

Very fast C# implementation of Aho Corasick algorithm based on Double Array Trie: efficient text search of many substrings with O(n) complexity. Automata state may be efficiently serialized to binary stream.

Install-Package NReco.Text.AhoCorasickDoubleArrayTrie -Version 1.0.2
dotnet add package NReco.Text.AhoCorasickDoubleArrayTrie --version 1.0.2
<PackageReference Include="NReco.Text.AhoCorasickDoubleArrayTrie" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NReco.Text.AhoCorasickDoubleArrayTrie --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

How to use:

var keywords = new Dictionary<string,int>() { {"are", 1},  {"is", 1}, {"he", 2}, {"she", 2}, {"it", 2}, {"we", 2} };
var matcher = new AhoCorasickDoubleArrayTrie<int>( keywords );
var text = "we are all champions";
matcher.ParseText(text, (hit) => {
 Console.WriteLine("Matched: {0} = {1}", text.Substring(hit.Begin, hit.Length), hit.Value );

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.2 8,909 6/14/2019
1.0.1 1,439 12/13/2017
1.0.0 561 12/6/2017