|
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<IWord<T>>
org.schwiebert.abl4j.data.impl.abl.Sentence<T>
org.schwiebert.abl4j.data.impl.abl.Tree<T>
public final class Tree<T>
A Tree is an ISentence which additionally contains a Vector of
.
IConstituents
| Field Summary | |
|---|---|
private double |
score
The probability of the sentence. |
private static long |
serialVersionUID
|
private List<IConstituent<T>> |
structure
|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
Tree()
Creates a new, empty Tree. |
|
| Method Summary | |
|---|---|
void |
addAllWords(List<IWord<T>> otherWords)
Adds the given list of words to the list of words already contained in the ITree, as in List.addAll(java.util.Collection) |
boolean |
addStructure(IConstituent<T> c)
Adds a constituent c to the tree. |
void |
addWord(IWord<T> w)
Adds IWord w to the list of words, as in
List.add(Object) |
void |
changeSentence(List<IWord<T>> words)
Removes all words currently contained in this Tree, and adds all Word objects in words. |
void |
clear()
This procedure clears the entire tree (sentence and structure). |
ITree<T> |
cloneTree()
Returns a copy of this object. |
ISentence<T> |
createSubStructure(int begin,
int end)
|
Iterator<IConstituent<T>> |
findStructure(IConstituent<T> c)
This procedure returns an iterator to c in the tree. |
List<IConstituent<T>> |
getConstituentStructure()
Returns all Constituents stored in this Tree. |
int |
getNumberOfConstituents()
This procedure returns the number of hypotheses the tree contains |
double |
getSentenceScore()
Returns the probability of the sentence. |
void |
setSentenceScore(double score)
Sets the probability of the sentence to the given value. |
| Methods inherited from class org.schwiebert.abl4j.data.impl.abl.Sentence |
|---|
addWords, buildSimilarSentencesSet, getCommentLine, getSequenceId, getSequenceText, getWords, indexOf, isSimilarTo, registerWordsInSentence, setCommentLine, setSequenceId |
| Methods inherited from class java.util.ArrayList |
|---|
add, add, addAll, addAll, 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.ISentence |
|---|
addWords, buildSimilarSentencesSet, get, getCommentLine, getSequenceId, getSequenceText, getWords, indexOf, isSimilarTo, registerWordsInSentence, setCommentLine, setSequenceId, size, subList |
| Methods inherited from interface java.util.List |
|---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
| Field Detail |
|---|
private static final long serialVersionUID
private final List<IConstituent<T>> structure
private double score
| Constructor Detail |
|---|
public Tree()
| Method Detail |
|---|
public ITree<T> cloneTree()
ITree
cloneTree in interface ITree<T>public boolean addStructure(IConstituent<T> c)
ITreefalse will be returned.
Otherwise, c is added itself and the method returns true.
addStructure in interface ITree<T>public void clear()
ITree
clear in interface Collection<IWord<T>>clear in interface List<IWord<T>>clear in interface ITree<T>clear in class ArrayList<IWord<T>>public void changeSentence(List<IWord<T>> words)
ITreewords.
changeSentence in interface ITree<T>public int getNumberOfConstituents()
ITree
getNumberOfConstituents in interface ITree<T>public Iterator<IConstituent<T>> findStructure(IConstituent<T> c)
ITree
findStructure in interface ITree<T>public List<IConstituent<T>> getConstituentStructure()
ITree
getConstituentStructure in interface ITree<T>
public ISentence<T> createSubStructure(int begin,
int end)
createSubStructure in interface ITree<T>public void setSentenceScore(double score)
ITree
setSentenceScore in interface ITree<T>public double getSentenceScore()
ITree
getSentenceScore in interface ITree<T>public void addAllWords(List<IWord<T>> otherWords)
ITreeITree, as in List.addAll(java.util.Collection)
addAllWords in interface ITree<T>public void addWord(IWord<T> w)
ITreeIWord w to the list of words, as in
List.add(Object)
addWord in interface ITree<T>
|
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 | |||||||||