|
ABL4J (Alignment Based Learning for Java) - 0.9.7 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<ITree<T>>
org.schwiebert.abl4j.data.impl.abl.TreeBank<T>
public final class TreeBank<T>
A Treebank is a List of ITree objects.
| Field Summary | |
|---|---|
private Vector<String> |
comments
|
private int |
current
|
private boolean |
exhaustive
|
private static long |
serialVersionUID
|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
TreeBank()
|
|
| Method Summary | |
|---|---|
void |
addAllTrees(Collection<ITree<T>> trees)
Adds the collection trees to the treebank, as in
List.addAll(Collection) |
void |
addComment(String string)
Adds a comment to this treebank. |
void |
addTree(ITree<T> tree)
Adds ITree tree to this
treebank, as in List.add(Object) |
void |
doReverse()
TODO: This method is not tested yet, as it's only used by suffix tree alignment. |
Vector<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> t)
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. |
| Methods inherited from class java.util.ArrayList |
|---|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
equals, hashCode, iterator, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, removeAll, retainAll, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.schwiebert.abl4j.data.ITreeBank |
|---|
clear, get, size |
| Methods inherited from interface java.util.List |
|---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
| Field Detail |
|---|
private static final long serialVersionUID
private Vector<String> comments
private boolean exhaustive
private int current
| Constructor Detail |
|---|
public TreeBank()
| Method Detail |
|---|
public void setExhaustive(boolean v)
ITreeBank
setExhaustive in interface ITreeBank<T>public boolean isExhaustive()
ITreeBank
isExhaustive in interface ITreeBank<T>public void doReverse()
ITreeBank
doReverse in interface ITreeBank<T>public int getCurrentIndex()
ITreeBank
getCurrentIndex in interface ITreeBank<T>public void incrementCurrentIndex()
ITreeBank
incrementCurrentIndex in interface ITreeBank<T>public void setCurrentIndex(int current)
ITreeBank
setCurrentIndex in interface ITreeBank<T>public int getNumberOfConstituents()
ITreeBankIConstituents stored in
all trees in this treebank.
getNumberOfConstituents in interface ITreeBank<T>public void addComment(String string)
ITreeBank
addComment in interface ITreeBank<T>public Vector<String> getComments()
ITreeBank
getComments in interface ITreeBank<T>public void addTree(ITree<T> tree)
ITreeBankITree tree to this
treebank, as in List.add(Object)
addTree in interface ITreeBank<T>tree - the tree to addpublic int indexOf(ITree<T> t)
ITreeBankITree tree. Returns
-1 if the tree is not contained in the treebank.
indexOf in interface ITreeBank<T>t - the tree
List.indexOf(Object)public void addAllTrees(Collection<ITree<T>> trees)
ITreeBanktrees to the treebank, as in
List.addAll(Collection)
addAllTrees in interface ITreeBank<T>trees - the trees to add.public Collection<? extends ITree<T>> getTrees()
ITreeBankITrees stored in the treebank.
getTrees in interface ITreeBank<T>ITree-objects
|
ABL4J (Alignment Based Learning for Java) - 0.9.7 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||