|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttextmaven.dictionaries.BaseDictionary
textmaven.dictionaries.Dictionary
textmaven.dictionaries.DictOrgDictionary
Implements a wormagic ISource with a dictionary file as backend. The dictionary file is expected to be in the format that is used for the files accompanying the free dict daemon available at http://www.dict.org. Parsing for synonyms etc. is specific to the dictionary sub type e.g. WordNet, GCide etc. is not currently performed.
Field Summary |
Fields inherited from interface textmaven.Globals |
C_ATTR_CLASSNAME, C_DICT_BASE_TYPE, C_DICT_TYPE, C_SERVER_BASE_TYPE, C_STEMMER_BASE_TYPE, C_WRITER_BASE_TYPE, CONFIG_FILE, DEFAULT_SENTENCES, DEFAULT_SEPARATOR, NEW_PARA, T_COL_DICTIONARY, T_COL_HOMONYMID, T_COL_ID, T_COL_LEXKEY, T_COL_TRANSLATION, T_COL_WORDCLASS, VERBOSE |
Constructor Summary | |
DictOrgDictionary()
|
Method Summary | |
void |
close()
Performs close operations on the source. |
boolean |
containsKey(java.lang.String key)
Checks whether a key is contained in the dictionary. |
java.lang.String |
getFileName()
|
boolean |
isCompressed()
|
java.util.Iterator |
keys()
Returns all keys as specified in dictionary. |
java.util.Iterator |
keysWithPrefix(java.lang.String prefix)
Returns all keys starting with the specified prefix |
void |
open()
Opens connection to datasource |
static void |
printWords(java.util.Iterator translations)
|
void |
setCompressed(boolean compressed)
|
void |
setCompressed(java.lang.String compressed)
Support setting the compressed property with a string representing a boolean. |
void |
setFileName(java.lang.String fileBaseName)
|
java.util.Iterator |
translations()
Returns all translations available in the dictionary. |
java.util.Iterator |
translations(java.lang.String word)
Retrieves available translations for a given word. |
Methods inherited from class textmaven.dictionaries.Dictionary |
getStemmer, keys, setStemmer |
Methods inherited from class textmaven.dictionaries.BaseDictionary |
getDescription, getId, getLanguage, setDescription, setId, setLanguage, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface textmaven.dictionaries.IBaseDictionary |
getDescription, getId, getLanguage, setDescription, setId, setLanguage |
Constructor Detail |
public DictOrgDictionary()
Method Detail |
public java.util.Iterator translations(java.lang.String word)
IDictionary
The word is retrieved from the dictionary as passed in as parameter. If no translation is found, an empty iterator.
translations
in interface IDictionary
translations
in class Dictionary
public java.util.Iterator translations()
IDictionary
translations
in interface IDictionary
Translation
public boolean containsKey(java.lang.String key)
IDictionary
containsKey
in interface IDictionary
containsKey
in class Dictionary
public java.util.Iterator keys()
IDictionary
keys
in interface IDictionary
keys
in class Dictionary
public java.util.Iterator keysWithPrefix(java.lang.String prefix)
IDictionary
keysWithPrefix
in interface IDictionary
prefix
-
public void open()
IBaseDictionary
open
in interface IBaseDictionary
open
in class Dictionary
public void close()
IBaseDictionary
close
in interface IBaseDictionary
close
in class Dictionary
public boolean isCompressed()
public void setCompressed(boolean compressed)
compressed
- The compressed to set.public void setCompressed(java.lang.String compressed)
compressed
- true or flase.public java.lang.String getFileName()
public void setFileName(java.lang.String fileBaseName)
fileBaseName
- The fileBaseName to set.public static void printWords(java.util.Iterator translations)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |