cloudflare / ahocorasick Goto Github PK
View Code? Open in Web Editor NEWA Golang implementation of the Aho-Corasick string matching algorithm
License: BSD 3-Clause "New" or "Revised" License
A Golang implementation of the Aho-Corasick string matching algorithm
License: BSD 3-Clause "New" or "Revised" License
I've noticed that the implementation doesn't return the index of where keywords were found in text. This forces the user to do another search for the keyword to find its index, while the Aho Corasick algorithm should be able to provide this information for no extra cost.
I've made several modifications to the implementation in my fork https://github.com/issamemari/ahocorasick, among which is making the algorithm return the index the index. I'm happy to submit a PR that includes only the changes related to this.
The algorithm assumes that the dictionary is fixed. I've found that in practical applications it may happen that the user needs to add new strings to the keyword dictionary and have the matching algorithm be able to start matching those on the fly.
This problem has been studied and a modification to the Aho Corasick algorithm to make it support incremental matching has been proposed by Bertrand Meyer in his article "Incremental string matching".
I've made several modifications to the implementation in my fork , among which is adding the possibility to do incremental string matching as described in Bertrand's article.
I'm happy to submit a PR with only the changes related to this.
I recently consumed this module while working on a project. However, since this repository lacked a robust testing and benchmarking module, I created one and I am now looking to share it.
The testing and benchmarking module I implemented ran the algorithm against English, Chinese, and Vietnamese words and phrases.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.