Class Lexicon

java.lang.Object
  extended byLexicon

public class Lexicon
extends java.lang.Object

Our lexicon (mainly for cases in which hyphenation etc. is difficult, for example).


Constructor Summary
Lexicon()
          Create an instance of Lexicon.
 
Method Summary
 void addItem(YaspWord word)
          Adds an item to the lexicon.
 YaspWord getItem(java.lang.String s)
          Looks for a given string as a graphemic representation in the lexicon, returning the item as a YaspWord.
 void printLexicon()
          Print all the entries of the lexicon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Lexicon

public Lexicon()
Create an instance of Lexicon.

Method Detail

getItem

public YaspWord getItem(java.lang.String s)
Looks for a given string as a graphemic representation in the lexicon, returning the item as a YaspWord. If nothing is found, the return value is NULL.

Parameters:
s - your string.
Returns:
the item as a YaspWord.

addItem

public void addItem(YaspWord word)
Adds an item to the lexicon. Note: If the map previously contained a mapping for this key, the old value is replaced.


printLexicon

public void printLexicon()
Print all the entries of the lexicon.