de.ls5.jlearn.interfaces
Interface Alphabet

All Superinterfaces:
Serializable
All Known Implementing Classes:
AlphabetImpl

public interface Alphabet
extends Serializable

An alphabet is an ordered set of symbols. A learning algorithm, e.g., would be informed on what symbols should be used when constructing queries by means of providing an alphabet containing these symbols.

Author:
merten

Method Summary
 Symbol addSymbol(Symbol symbol)
          Add Symbol to this alphabet.
 Symbol addSymbol(Symbol symbol, int index)
          Add Symbol to this alphabet at the specified index.
 int getIndexForSymbol(Symbol symbol)
          Return index of the given Symbol in this alphabet.
 Symbol getSymbolByIndex(int index)
          Return Symbol with the given index in this alphabet.
 List<Symbol> getSymbolList()
          Return a list of all Symbol objects in this alphabet.
 int size()
          Return number of smybols in this alphabet.
 

Method Detail

getIndexForSymbol

int getIndexForSymbol(Symbol symbol)
Return index of the given Symbol in this alphabet.

Parameters:
symbol -
Returns:
index of symbol if symbol is in alphabet, -1 otherwise.

getSymbolByIndex

Symbol getSymbolByIndex(int index)
Return Symbol with the given index in this alphabet.

Parameters:
index -
Returns:
symbol with given index if symbol is in alphabet, null otherwise.

addSymbol

Symbol addSymbol(Symbol symbol)
Add Symbol to this alphabet.

Parameters:
symbol -
Returns:
symbol added to the alphabet

addSymbol

Symbol addSymbol(Symbol symbol,
                 int index)
Add Symbol to this alphabet at the specified index.

Parameters:
symbol -
index -
Returns:
symbol added to the alphabet

getSymbolList

List<Symbol> getSymbolList()
Return a list of all Symbol objects in this alphabet.

Returns:
list of symbols

size

int size()
Return number of smybols in this alphabet.

Returns:
number of symbols in alphabet


Copyright © 2011. All Rights Reserved.