-
Notifications
You must be signed in to change notification settings - Fork 19.9k
Add AhoCorasick
#4465
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
Add AhoCorasick
#4465
Conversation
Prabhat-Kumar-42
commented
Sep 30, 2023
- I have read CONTRIBUTING.md.
- This pull request is all my own work -- I have not plagiarized it.
- All filenames are in PascalCase.
- All functions and variable names follow Java naming conventions.
- All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
Hey, |
bro how did you convert into clang format |
Hey, below are the steps for clang. clang-format -i --style=file path/to/your/file.java If you do not have the correct version of Line 86 in ea0eef1
and add the new line symbol at the end of your file manually (but do not commit the changed .clang-format file).
If you use gitpod, everything should run smoothly there. Originally posted by @vil02 in #4438 (comment) |
I request the maintainer(s) to please merge my request using "hacktoberfest-accepted" label. |
…into AhoCorasick updating the branch with upstream
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting contribution!
The code is quite complex - it could be simplified by introducing some new helper methods. It is not easy, but we will make it perfect!
…ldNodesOfTheRoot() method, hashmap string search position (also has previous index based search), removed java.util.*
…into AhoCorasick updated local repo with that of github
Hey @vil02 , I have updated the changes you have mentioned. Please review the code. If there's anything that needs to be modified, please let me know. Thank You !! |
…thod initializePositionByStringIndexValue()
…on recording in searchIn()
Hey @vil02 , I have updated the changes you have mentioned. I tried what you said above about wrapping up pattern indexing in another class. I hope you like it. Still If there's any thing that needs to be added or if you want me to revert it back to how it was, please do tell me. I will address it asap. Please review the code. Thank You !! |
@Prabhat-Kumar-42 wow, this was a pull-request. Thanks! |
Closes #4464. |
Thanks @vil02 , It was fun working with you and I learned a lot in the process. |