|
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 | |||||||||
public interface ISentence<T>
An ISentence is used to store a sequence of IWords.
Default implementation: Sentence.
| Method Summary | |
|---|---|
void |
addWords(List<IWord<T>> words)
Adds all IWord stored in words to this sentence,
as in List.addAll(java.util.Collection). |
void |
buildSimilarSentencesSet()
This procedure considers each word in the sentence and fills the set "similars" with sentences to compare with as these sentences have at least one word in common. |
IWord<T> |
get(int index)
Returns the IWord at the given index |
String |
getCommentLine()
Returns the commentLine |
int |
getSequenceId()
This procedure returns the sentence ID |
String |
getSequenceText()
Returns a string representation of this sequence. |
List<IWord<T>> |
getWords()
Returns the list of all IWords in this sentence. |
int |
indexOf(IWord<T> elem,
int index)
Searches for the first occurence of the given argument, beginning the search at index, and testing for equality using
the equals method. |
boolean |
isSimilarTo(int id)
This procedure returns true if the current sentence has in its "similars" set the sentence specified with argument "id", and returns false if it has not, or if the map of similar sentences has not been created (Because buildSimilarSentencesSet() has not been called). |
void |
registerWordsInSentence()
This procedure considers each word in the sentence and registers its appearance in the current sentence to facilitate future decisions on which sentences to compare with. |
void |
setCommentLine(String commentLine)
Sets the commentLine |
void |
setSequenceId(int id)
This procedure sets the sentence ID |
int |
size()
Returns the number of IWords in this sentence. |
List<IWord<T>> |
subList(int begin,
int end)
Returns the subList of IWord from begin to
end, as defined in List.subList(int, int). |
| Method Detail |
|---|
void setCommentLine(String commentLine)
commentLine - String getCommentLine()
void setSequenceId(int id)
int getSequenceId()
void registerWordsInSentence()
void buildSimilarSentencesSet()
boolean isSimilarTo(int id)
buildSimilarSentencesSet() has not been called).
String getSequenceText()
int indexOf(IWord<T> elem,
int index)
index, and testing for equality using
the equals method.
elem - an object.index - the non-negative index to start searching from.
index or later in the
sequence, that is, the smallest value k such that
elem.equals(elementData[k]) && (k >= index) is
true; returns -1 if the object is not
found. (Returns -1 if index >= the
current size of this sequence.)
IndexOutOfBoundsException - if index is negative.Object.equals(Object),
List.indexOf(Object)
List<IWord<T>> subList(int begin,
int end)
IWord from begin to
end, as defined in List.subList(int, int).
begin - the begin index (included)end - the end index (not included)
List.subList(int, int)List<IWord<T>> getWords()
IWords in this sentence.
int size()
IWords in this sentence.
IWord<T> get(int index)
IWord at the given index
index - the index of the word.
void addWords(List<IWord<T>> words)
IWord stored in words to this sentence,
as in List.addAll(java.util.Collection).
words -
|
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 | |||||||||