java 广义后缀树Java实现

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/969448/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-29 14:37:46  来源:igfitidea点击:

Generalized Suffix Tree Java Implementation

javasuffix-tree

提问by

I am looking for a Java implementation of the Generalized Suffix Tree (GST) with the following features:

我正在寻找具有以下功能的通用后缀树 (GST) 的 Java 实现:

After the creation of the GST from say 1000 strings I would like find out how many of these 1000 strings contains some other string 's'.

在从 1000 个字符串创建 GST 之后,我想找出这 1000 个字符串中有多少包含一些其他字符串 's'。

The search must be quiet fast, as I need to apply the search on about 100'000 candidate strings of average length 10.

搜索必须安静快速,因为我需要对大约 100'000 个平均长度为 10 的候选字符串进行搜索。

回答by H Marcelo Morales

Try The Semantic Discovery Toolkit. It has an implementation on text/src/java/org/sd/text/radixtree

试试语义发现工具包。它在 text/src/java/org/sd/text/radixtree 上有一个实现

回答by Dr. Max V?lkel

There is a Java implementation of a Non-General Suffix Tree is available at: http://illya-keeplearning.blogspot.com/2009/04/suffix-trees-java-ukkonens-algorithm.html

非通用后缀树的 Java 实现可从以下网址获得:http: //illya-keeplearning.blogspot.com/2009/04/suffix-trees-java-ukkonens-algorithm.html

回答by Garret Wilson

I created a suffix tree in Java that allows you easily add your own search functionality and other matching algorithms. My blog post, Suffix Trees in Java, has an overview as well as instructions for downloaded the latest version. My Java implementation is based on Mark Nelson's Fast String Searching With Suffix Treesarticle.

我用 Java 创建了一个后缀树,它允许您轻松添加自己的搜索功能和其他匹配算法。我的博客文章Java 中的后缀树提供了最新版本的概述和说明。我的 Java 实现基于 Mark Nelson 的Fast String Searching With Suffix Trees文章。

Update 2016-06-18

更新 2016-06-18

回答by abahgat

You can find an implementation of a Generalized Suffix Tree in Javahere. I tried to document it as much as I could, so you might find it useful.

您可以此处找到Java 中通用后缀树的实现。我尽量把它记录下来,所以你可能会发现它很有用。

回答by eold

Here is my implementation of SuffixTree: https://github.com/losvald/sglj/blob/master/src/main/java/org/sglj/util/PATTrie.java

这是我对 SuffixTree 的实现:https: //github.com/losvald/sglj/blob/master/src/main/java/org/sglj/util/PATTrie.java

Among other things, it supports storing arbitrary data in nodes, and finding the set of values associated with the prefix.

除此之外,它支持在节点中存储任意数据,并找到与前缀关联的值集。