Class AugmentedLexicon

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended byLexicon
              extended byAugmentedLexicon
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class AugmentedLexicon
extends Lexicon

An AugmentedLexicon maps words onto constituents with features (ie., AugmentedConstituents).

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.HashMap
 
Nested classes inherited from class java.util.AbstractMap
 
Field Summary
 
Fields inherited from class Lexicon
description
 
Fields inherited from class java.util.HashMap
 
Fields inherited from class java.util.AbstractMap
 
Constructor Summary
AugmentedLexicon()
           
 
Method Summary
 void add(Symbol word, Constituent constit)
          Add AugmentedConstituent to list of entries for word, creating the list if necessary.
 void readFile(java.lang.String filename)
          Read the given filename and augment this AugmentedLexicon.
 
Methods inherited from class Lexicon
dump, dump, getDescription, getEntriesForWord, setDescription
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

AugmentedLexicon

public AugmentedLexicon()
Method Detail

add

public void add(Symbol word,
                Constituent constit)
Add AugmentedConstituent to list of entries for word, creating the list if necessary. We override our parent's method for this operation in order to ensure that only AugmentedConstituents are added to AugmentedLexicons. We will throw a ClassCastException if the given object is not a AugmentedConstituent. This is better than having it come up later when we try to use the constituent.

Overrides:
add in class Lexicon

readFile

public void readFile(java.lang.String filename)
              throws java.io.IOException
Read the given filename and augment this AugmentedLexicon.

Overrides:
readFile in class Lexicon
Throws:
java.io.IOException
See Also:
AugmentedLexiconFileHandler