An implementation of the non-deterministic state machine used in the Aho-Corasick pattern matching algorithm.
Esempio n. 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);
 }
Esempio n. 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);
 }