Perhaps, I will address this limitation in later posts.ĪbstractMultipleExactStringMatcher.java: package
Note, however, that this implementations considers only a, b, c. The first algorithm is Aho-Corasick, and the other one is brute force. For example: Text: habababaĪbove, aba occurs 3 times, and ha occurs one time (matches are allowed to overlap). I have this program that compares performance of two algorithm for multiple exact string matching: Given a set of patterns and the text, find in the text all occurrences of any pattern.