Class ConstructionAlgorithmWotd

  extended by

public class ConstructionAlgorithmWotd
extends java.lang.Object

This class implements the suffix tree construction algorithm write-only-top-down. By calling the constructor with a Collection of texts and then initialiseSuffixTree() the suffix tree will be initialized. All elements of the Collection must be an instance of StringBuffer and match the following regular expression: \S+([ ]\S+)*. The algorithm will parse the string word-wise which means that the edge labels of any resulting suffix tree will be one or more words.

aitools 3.0 $Id:,v 1.1 2010/05/19 15:48:58 poma1006 Exp $
Martin Potthast

Constructor Summary
          Constructor for write-only-top-down algorithm.
Method Summary
 java.util.List<java.lang.String> getVocabulary()
 SuffixTreeNode initialiseSuffixTree(java.lang.Iterable<java.lang.String> texts)
          This method initialises the suffix tree.
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ConstructionAlgorithmWotd()
Constructor for write-only-top-down algorithm. By calling initialiseSuffixTree after constructing an instance of this class a suffix tree for the Collection of texts will be built. All texts must be an instance of StringBuffer.

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


public SuffixTreeNode initialiseSuffixTree(java.lang.Iterable<java.lang.String> texts)
This method initialises the suffix tree. It should be called directly after constructing an instance of this class. It will return an instance of TreeStructure which wraps the structure of the tree containing the suffix tree.

A suffix tree wrapped by a TreeStructure instance.


public java.util.List<java.lang.String> getVocabulary()
Returns the words.