Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
aho-corasick2
Advanced tools
Readme
aho-corasick2 - Aho–Corasick string matching algorithm
#Installation
$ npm install aho-corasick2
import * as AhoCorasick from 'aho-corasick2';
import AhoCorasick from 'aho-corasick2';
import AhoCorasick = require('aho-corasick2');
var ac, actual, i, len, ref, word;
ac = new AhoCorasick();
ref = ['say', 'she', 'shr', 'he', 'her'];
for (i = 0, len = ref.length; i < len; i++) {
word = ref[i];
ac.add(word, {
word: word
});
}
ac.build_fail();
console.dir(ac, {
depth: null,
colors: true,
});
actual = {};
ac.search('yasherhs', function(found_word) {
if (actual[found_word] == null) {
actual[found_word] = 0;
}
return actual[found_word]++;
});
console.dir(actual, {
depth: null,
colors: true,
});
ac = new AhoCorasick()
ac.add word, word:word for word in ['say', 'she', 'shr', 'he', 'her']
ac.build_fail()
console.log ac.to_dot()
save output as trie.dot
and
$ dot -Tpng trie.dot -o trie.png
You also need to install GraphViz
Dejian Xu Google+
wikipedia: Aho-Corasick
FAQs
Aho–Corasick string matching algorithm
We found that aho-corasick2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).