-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DFA that tracks phrases of power #2
Comments
I will be working on this. |
This is submitted. There is a stress test and a few normal tests. The only possible issue is the fact that currently if the word is "aa" and the text is "aaaaaa" we get a total of 3 matches, not 5 (which we don't know if it is correct.) |
FullDfa is the only Usage: from production.dfa import FullDfa |
working on adding hypothesis tests |
Tests added and passing I changed the API a bit,
|
It consumes characters one by one, and after each character increments some of 18 counters, each corresponding to number of occurrences of individual power phrases.
I expect this automaton to have not too many states (less than twice the total length of all power words).
I think it'll be very useful for dynamic programming approximations to the solution.
The text was updated successfully, but these errors were encountered: