ABL4J (Alignment Based Learning for Java) - 0.9.7

org.schwiebert.abl4j.data
Interface ITreeBank<T>

All Known Implementing Classes:
TreeBank

public interface ITreeBank<T>

An ITreebank is a sequence of ITree objects. Default implementation: TreeBank.

Author:
sschwieb

Method Summary
 void addAllTrees(Collection<ITree<T>> trees)
          Adds the collection trees to the treebank, as in List.addAll(Collection)
 void addComment(String comment)
          Adds a comment to this treebank.
 void addTree(ITree<T> tree)
          Adds ITree tree to this treebank, as in List.add(Object)
 void clear()
          Removes all ITrees in this treebank, as in List.clear()
 void doReverse()
          TODO: This method is not tested yet, as it's only used by suffix tree alignment.
 ITree<T> get(int i)
          Returns the ITree at index i, as in List.get(int)
 List<String> getComments()
          Returns all comments on this treebank.
 int getCurrentIndex()
          Returns the current index in the Treebank.
 int getNumberOfConstituents()
          Returns the number of IConstituents stored in all trees in this treebank.
 Collection<? extends ITree<T>> getTrees()
          Returns all ITrees stored in the treebank.
 void incrementCurrentIndex()
          Increases the current index.
 int indexOf(ITree<T> tree)
          Returns the index of ITree tree.
 boolean isExhaustive()
          Returns the exhaustive flag of this Treebank.
 void setCurrentIndex(int current)
          Sets the current index to current.
 void setExhaustive(boolean v)
          This procedure sets whether or not to preserve memory by aligning all possible sentence pairs.
 int size()
          Returns the number of ITree-objects stored in this treebank.
 

Method Detail

setExhaustive

void setExhaustive(boolean v)
This procedure sets whether or not to preserve memory by aligning all possible sentence pairs.


isExhaustive

boolean isExhaustive()
Returns the exhaustive flag of this Treebank.

Returns:

doReverse

void doReverse()
TODO: This method is not tested yet, as it's only used by suffix tree alignment.


getCurrentIndex

int getCurrentIndex()
Returns the current index in the Treebank.


incrementCurrentIndex

void incrementCurrentIndex()
Increases the current index.


setCurrentIndex

void setCurrentIndex(int current)
Sets the current index to current.

Parameters:
currentthe - current index

getNumberOfConstituents

int getNumberOfConstituents()
Returns the number of IConstituents stored in all trees in this treebank.

Returns:
the number of constituents

size

int size()
Returns the number of ITree-objects stored in this treebank.

Returns:
the number of ITrees

get

ITree<T> get(int i)
Returns the ITree at index i, as in List.get(int)

Parameters:
i - the index
Returns:
the ITree at index i

addComment

void addComment(String comment)
Adds a comment to this treebank.

Parameters:
the - comment

getComments

List<String> getComments()
Returns all comments on this treebank.

Returns:

addTree

void addTree(ITree<T> tree)
Adds ITree tree to this treebank, as in List.add(Object)

Parameters:
tree - the tree to add

indexOf

int indexOf(ITree<T> tree)
Returns the index of ITree tree. Returns -1 if the tree is not contained in the treebank.

Parameters:
tree - the tree
Returns:
the index of the tree
See Also:
List.indexOf(Object)

clear

void clear()
Removes all ITrees in this treebank, as in List.clear()


getTrees

Collection<? extends ITree<T>> getTrees()
Returns all ITrees stored in the treebank.

Returns:
all ITree-objects

addAllTrees

void addAllTrees(Collection<ITree<T>> trees)
Adds the collection trees to the treebank, as in List.addAll(Collection)

Parameters:
trees - the trees to add.

ABL4J (Alignment Based Learning for Java) - 0.9.7

© 2007 Stephan Schwiebert