|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.mit.jwi.RAMDictionary.DictionaryData
public static class RAMDictionary.DictionaryData
Object that holds all the dictionary data loaded from the Wordnet files.
| Nested Class Summary | |
|---|---|
class |
RAMDictionary.DictionaryData.WordBuilder
A utility class that allows us to build word objects |
| Field Summary | |
|---|---|
protected java.util.Map<POS,java.util.Map<IExceptionEntryID,IExceptionEntry>> |
exceptions
|
protected java.util.Map<POS,java.util.Map<IIndexWordID,IIndexWord>> |
idxWords
|
protected java.util.Map<ISenseKey,ISenseEntry> |
senses
|
protected java.util.Map<POS,java.util.Map<ISynsetID,ISynset>> |
synsets
|
protected IVersion |
version
|
protected java.util.Map<ISenseKey,IWord> |
words
|
| Constructor Summary | |
|---|---|
RAMDictionary.DictionaryData()
Constructs an empty dictionary data object. |
|
| Method Summary | ||
|---|---|---|
void |
compact()
Compacts this dictionary data object by resizing the internal maps, and removing redundant objects where possible. |
|
protected
|
compactMap(java.util.Map<K,V> map)
Compacts a regular map. |
|
void |
compactObjects()
Replaces redundant objects where possible |
|
protected
|
compactPOSMap(java.util.Map<POS,java.util.Map<K,V>> map)
Compacts a part-of-speech map |
|
void |
compactSize()
Resizes the internal data maps to be the exact size to contain their data. |
|
protected IIndexWord |
makeIndexWord(IIndexWord old)
Creates a new index word that replicates the specified index word. |
|
protected
|
makeMap(int initialSize,
java.util.Map<K,V> contents)
Creates the actual sub-maps for the part-of-speech maps. |
|
protected
|
makePOSMap()
This method is used when constructing the dictionary data object. |
|
protected ISynset |
makeSynset(ISynset old)
Creates a new synset object that replaces all the old internal ISynsetID objects with those from the denoted synsets,
thus throwing away redundant sysnet ids. |
|
protected IWord |
makeWord(ISynset newSynset,
ISynset oldSynset,
IWord old)
Creates a new word object that replaces all the old internal IWordID objects with those from the denoted words, thus
throwing away redundant word ids. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected IVersion version
protected java.util.Map<POS,java.util.Map<IIndexWordID,IIndexWord>> idxWords
protected java.util.Map<POS,java.util.Map<ISynsetID,ISynset>> synsets
protected java.util.Map<POS,java.util.Map<IExceptionEntryID,IExceptionEntry>> exceptions
protected java.util.Map<ISenseKey,IWord> words
protected java.util.Map<ISenseKey,ISenseEntry> senses
| Constructor Detail |
|---|
public RAMDictionary.DictionaryData()
| Method Detail |
|---|
protected <K,V> java.util.Map<POS,java.util.Map<K,V>> makePOSMap()
K - the type of the keys for the sub-mapsV - the type of the values for the sub-maps
protected <K,V> java.util.Map<K,V> makeMap(int initialSize,
java.util.Map<K,V> contents)
LinkedHashMap maps.
K - the type of the keys for the sub-mapsV - the type of the values for the sub-mapsinitialSize - the initial size of the map; this parameter is ignored if
the contents parameter is non-
null.contents - the items to be inserted in the map, may be
null. If non-null, the
initialSize parameter is ignored
java.lang.IllegalArgumentException - if the initial size is invalid (less than 1) and the
specified contents are nullpublic void compact()
public void compactSize()
protected <K,V> void compactPOSMap(java.util.Map<POS,java.util.Map<K,V>> map)
map - the part-of-speech keyed map to be compactedprotected <K,V> java.util.Map<K,V> compactMap(java.util.Map<K,V> map)
map - the map to be compacted, may not be null.
java.lang.NullPointerException - if the specified map is nullpublic void compactObjects()
protected ISynset makeSynset(ISynset old)
ISynsetID objects with those from the denoted synsets,
thus throwing away redundant sysnet ids.
old - the synset to be replicated
java.lang.NullPointerException - if the specified synset is null
protected IWord makeWord(ISynset newSynset,
ISynset oldSynset,
IWord old)
IWordID objects with those from the denoted words, thus
throwing away redundant word ids.
newSynset - the synset for which the word is being madeoldSynset - the old synset from which the word should be madeold - the word to be replicated
java.lang.NullPointerException - if any argument is nullprotected IIndexWord makeIndexWord(IIndexWord old)
old - the index word to be replicated
java.lang.NullPointerException - if the specified index word is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||