ABL4J (Alignment Based Learning for Java) - 0.9.7

org.schwiebert.abl4j.util
Interface IWordMapping<T>

Type Parameters:
T -
All Known Implementing Classes:
StringMapping, WordMapping

public interface IWordMapping<T>

Different implementations of IWordMapping allow users to align different kind of data. The default word mapping used in ABL4J, WordMapping, is used to map any Object to an int value, so you'll probably only have to provide WordMapping with a custom Comparator to make ABL4J aware of a new class.

Author:
sschwieb

Method Summary
 void addIndexToSentence(int wordId, int sentenceId)
          This method is called to register the use of the word wordId in sentence sentenceId.
 Vector<Integer> getSentencesOfIndex(int wordId)
          Returns a list of all sequences which contain the word with id wordId.
 T getWord(int wordId)
          Returns the word with id wordId
 int getWordIndexByObject(T data)
          Returns the word id of data
 

Method Detail

addIndexToSentence

void addIndexToSentence(int wordId,
                        int sentenceId)
This method is called to register the use of the word wordId in sentence sentenceId.


getSentencesOfIndex

Vector<Integer> getSentencesOfIndex(int wordId)
Returns a list of all sequences which contain the word with id wordId.

Parameters:
wordId -
Returns:

getWord

T getWord(int wordId)
Returns the word with id wordId

Parameters:
wordId -
Returns:

getWordIndexByObject

int getWordIndexByObject(T data)
Returns the word id of data

Parameters:
data -
Returns:

ABL4J (Alignment Based Learning for Java) - 0.9.7

© 2007 Stephan Schwiebert