Skip to content

Implementation of Aho-Corasick string matching algorithm on .NET

License

Notifications You must be signed in to change notification settings

tuyndv/AhoCorasick.Net

 
 

Repository files navigation

AhoCorasick.net

Efficient and very fast implementation of Aho-Corasick string matching algorithm on .NET
TBA

Install

It's available via nuget package
PM> Install-Package AhoCorasick.Net

Or nuget package with sources only
PM> Install-Package AhoCorasick.Net.Source

Example Usage

var botKeywords = new AhoCorasickTree(new[] { "abot", "apachebench", "googlebot", "libwww-perl", "etc" });
var userAgent = "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.99 Safari/537.36";
var isBot = botKeywords.Contains(userAgent);

About

Implementation of Aho-Corasick string matching algorithm on .NET

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 81.1%
  • F# 17.8%
  • Batchfile 1.1%