-
Notifications
You must be signed in to change notification settings - Fork 121
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
new 'iter_long' match misses after the recent fix #185
Comments
This happens for me as well. 1.4.4 worked fine, 2.0.0 misses the longest match! |
This is indeed a bug introduced by a previous fix for The idea is before you fail over to the suffix node, perform a check to see whether there is possibly longer match ahead the current node. If there is a longer match, we should give up the suffix failover. |
ehhh, it does not fully work, since it's not enough to just look ahead one step. You need to look ahead all possible longer matches before deciding whether to fail over. Efficiency-wise that's not acceptable. |
#187 Come up with another fix, hopefully it works this time. Feedback welcomed. |
Anyone tested this fix? |
Just tested #187, looks like it's working for me from this branch:
Returns But I get this test failure with
Tests are passing otherwise: https://github.com/AyanSinhaMahapatra/pyahocorasick/actions/runs/8371293380/job/22920079498 |
After fix #174 which is discussed in #133.
I found the code below
matches [(6, 'ab')], but it matches [(7, 'abcabd')] in version 1.4.4.
The behavior before seems to be right in this situation.
The text was updated successfully, but these errors were encountered: