|
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 IWord<T>
This class is used to store a "word".
In Abl4J, a word can be any java object. Note: Internally, ABL uses
Word.index to determine the equality of two words. The index is generated
with the help of WordMapping and requires that Object.equals(Object)
and Object.hashCode() are overwritten properly.
Default implementation is Word.
| Method Summary | |
|---|---|
void |
addSentenceToWord(int sequenceid)
Adds the sequence with id sequenceId to this word. |
boolean |
equals(Object obj)
Two words are equal, if their indices are equal. |
int |
getIndex()
Returns the index of the word. |
List<Integer> |
getSentenceOccurrences()
Returns all sentences which contain this word. |
T |
getWord()
Returns the underlying string of the word. |
int |
hashCode()
Returns the hashcode of index, which is,
as in Integer, the value itself. |
void |
init(int index)
Initialize this word with the given index. |
String |
toString()
Returns a String-representation of this word. |
| Method Detail |
|---|
int hashCode()
index, which is,
as in Integer, the value itself.
hashCode in class Objectboolean equals(Object obj)
equals in class Objectint getIndex()
T getWord()
List<Integer> getSentenceOccurrences()
String toString()
String-representation of this word.
toString in class Objectvoid addSentenceToWord(int sequenceid)
sequenceid - the id of the sequencevoid init(int index)
IWord
is mapped to index.
index - the unique identifier of this IWord
|
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 | |||||||||