NReco.Text.AhoCorasickDoubleArrayTrie 1.0.1

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.

There is a newer version of this package available.
See the version list below for details.
Install-Package NReco.Text.AhoCorasickDoubleArrayTrie -Version 1.0.1
dotnet add package NReco.Text.AhoCorasickDoubleArrayTrie --version 1.0.1
<PackageReference Include="NReco.Text.AhoCorasickDoubleArrayTrie" Version="1.0.1" />
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.1
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 );

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.2 184 6/14/2019
1.0.1 1,238 12/13/2017
1.0.0 425 12/6/2017