An implementation of the non-deterministic state machine used in the Aho-Corasick pattern matching algorithm.
Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the AhoMatcher class for the
 /// specified patterns.
 /// </summary>
 /// <param name="patterns">The patterns to search for in text.</param>
 public AhoMatcher(List<string> patterns)
 {
     _machine = new Trie(patterns);
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the AhoMatcher class for the
 /// specified patterns.
 /// </summary>
 /// <param name="patterns">The patterns to search for in text.</param>
 public AhoMatcher(List <string> patterns)
 {
     _machine = new Trie(patterns);
 }