aho corasick代码 [英] aho corasick code

查看:74
本文介绍了aho corasick代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要用c ++实现aho corasick模式匹配算法吗?

I need an implementation of aho corasick pattern matching algorithm in c++ could any one help?

推荐答案

由于某种原因,我无法快速找到C ++实现的算法为您服务.我认为您可以通过自己进行搜索来更好地帮助自己.

到目前为止,我也有很多想法:
1)您可以使用以下C#实现: C#中的Aho-Corasick字符串匹配 [ http://en.wikipedia.org/wiki/Aho–Corasick_string_matching_algorithm [ ^ ])表示Aho–Corasick字符串匹配算法构成了基础原始Unix命令 fgrep ( http://en.wikipedia.org/wiki/Grep#变体 [ ^ ]).您可以下载该应用程序的Unix源代码,并在那里找到算法实现.请参阅这些Wikipedia文章上的其他参考.

—SA
By some reason, I could not quickly find C++ implementation of the algorithm for you. I think you can better help yourself by doing your own search.

So far, I got too ideas:
1) You can use this C# implementation: Aho-Corasick string matching in C#[^]. I have no idea how good is this one, but you can give it a try. Translation in C++ is not such a big problem.

2) The Wikipedia article (http://en.wikipedia.org/wiki/Aho–Corasick_string_matching_algorithm[^]) says that the Aho–Corasick string matching algorithm formed the basis of the original Unix command fgrep (http://en.wikipedia.org/wiki/Grep#Variations[^]). You could download Unix source code for this application and find the algorithm implementation there. See other references on these Wikipedia articles.

—SA


这篇关于aho corasick代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆