de.aitools.ir.retrievalmodels.representation.suffixtree
Class SuffixTree

java.lang.Object
  extended by de.aitools.ir.retrievalmodels.representation.suffixtree.SuffixTree

public class SuffixTree
extends java.lang.Object

This is a wrapper class which encapsulates all classes and methods needed to build a suffix tree for a Collection of texts. By calling the constructor of this class the suffix tree will be immediately initialized using the write-only-top-down algorithm. This algorithm was introduced by Giegerich, Kurtz and Stoye in their paper "Efficient Implementation of Lazy Suffix Trees".

Version:
aitools 3.0 $Id: SuffixTree.java,v 1.1 2010/05/19 15:48:58 poma1006 Exp $
Author:
Martin Potthast

Constructor Summary
SuffixTree()
          Constructor for a suffix tree instance.
 
Method Summary
 SuffixTreeNode getRoot()
          Returns the root node of the suffix tree.
 java.util.List<java.lang.String> getTexts()
           
 void setTexts(java.lang.Iterable<java.lang.String> texts)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SuffixTree

public SuffixTree()
Constructor for a suffix tree instance. The suffix tree will contain all elements of the Collection texts. All elements must be an instance of StringBuffer. Furthermore any texts should match the following regular expression: \S+([ ]\S+)*. The suffix tree will be immediately initialized.

Parameters:
texts - Collection containing all texts as instance of StringBuffer to build a suffix tree for.
Method Detail

getRoot

public SuffixTreeNode getRoot()
Returns the root node of the suffix tree.

Returns:
The root node of the suffix tree

setTexts

public void setTexts(java.lang.Iterable<java.lang.String> texts)

getTexts

public java.util.List<java.lang.String> getTexts()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()