edu.mit.jwi
Class Dictionary

java.lang.Object
  extended by edu.mit.jwi.CachingDictionary
      extended by edu.mit.jwi.Dictionary
All Implemented Interfaces:
IClosable, IHasCharset, IHasLifecycle, ICachingDictionary, IDictionary, IHasVersion

public class Dictionary
extends CachingDictionary

Basic IDictionary implementation that mounts files on disk and has caching. A file URL to the directory containing the Wordnet dictionary files must be provided. This implementation has adjustable caching.

Since:
JWI 1.0
Version:
2.4.0
Author:
Mark A. Finlayson

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.mit.jwi.CachingDictionary
CachingDictionary.ItemCache
 
Nested classes/interfaces inherited from interface edu.mit.jwi.ICachingDictionary
ICachingDictionary.IItemCache
 
Nested classes/interfaces inherited from interface edu.mit.jwi.data.IHasLifecycle
IHasLifecycle.LifecycleState, IHasLifecycle.ObjectClosedException, IHasLifecycle.ObjectOpenException
 
Constructor Summary
Dictionary(java.io.File wordnetDir)
          Constructs a new dictionary that uses the Wordnet files located in a directory pointed to by the specified file
Dictionary(java.net.URL wordnetDir)
          Constructs a new dictionary that uses the Wordnet files located in a directory pointed to by the specified url
 
Method Summary
 
Methods inherited from class edu.mit.jwi.CachingDictionary
cacheSynset, checkOpen, close, createCache, getBackingDictionary, getCache, getCharset, getExceptionEntry, getExceptionEntry, getExceptionEntryIterator, getIndexWord, getIndexWord, getIndexWordIterator, getSenseEntry, getSenseEntryIterator, getSynset, getSynsetIterator, getVersion, getWord, getWord, isOpen, open, setCharset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dictionary

public Dictionary(java.net.URL wordnetDir)
Constructs a new dictionary that uses the Wordnet files located in a directory pointed to by the specified url

Parameters:
wordnetDir - a url pointing to a directory containing the wordnet data files on the filesystem
Throws:
java.lang.NullPointerException - if the specified url is null
Since:
JWI 1.0

Dictionary

public Dictionary(java.io.File wordnetDir)
Constructs a new dictionary that uses the Wordnet files located in a directory pointed to by the specified file

Parameters:
wordnetDir - a file pointing to a directory containing the wordnet data files on the filesystem
Throws:
java.lang.NullPointerException - if the specified file is null
Since:
JWI 1.0


Copyright © 2007-2013 Massachusetts Institute of Technology. All Rights Reserved.