Skip to content
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

Aho-Corasick #167

Merged
merged 13 commits into from
Mar 3, 2024
Merged

Aho-Corasick #167

merged 13 commits into from
Mar 3, 2024

Conversation

Tagl
Copy link
Contributor

@Tagl Tagl commented Aug 15, 2023

Closes #162
@caleb531 @eliotwrobson
Haven't added tests for full coverage but I've done a fair bit of manual testing and it is producing correct results.
The DFA produced isn't necessarily minimal (consider {"ab", "abba"}) but it's certainly faster than taking multiple unions.
I've been trying to cut it down to a single BFS and then remove the object oriented nodes but there's always something that just isn't clicking for me, so I'm keeping it like this for now, maybe you will spot it.
I have to put this on hold on my end for a few days.

@coveralls
Copy link

coveralls commented Aug 15, 2023

Coverage Status

coverage: 99.612% (-0.03%) from 99.639%
when pulling 0a7d7a0 on Tagl:master
into 7eef60d on caleb531:develop.

@eliotwrobson eliotwrobson marked this pull request as ready for review March 3, 2024 22:08
Copy link
Collaborator

@eliotwrobson eliotwrobson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just rebased with a new docstring, everything looks good! Will merge soon.

@Tagl I wound up getting rid of the from_suffixes function, just because the API for this class is getting a little bloated, and that function was only a passthrough for the new functionality here.

@eliotwrobson eliotwrobson merged commit 5ccaaf1 into caleb531:develop Mar 3, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Aho-Corasick Algorithm
3 participants