|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object textmaven.dictionaries.BaseDictionary textmaven.dictionaries.Dictionary textmaven.dictionaries.LuceneDictionary
Field Summary | |
static org.apache.lucene.analysis.Analyzer |
ANALYZER
|
static java.lang.String |
KEYWORD
Lucene field used for the keyword of a word. |
static java.lang.String |
MEANING
Lucene field used for the meaning number of a word. |
static java.lang.String |
SOURCE
Lucene field used for the source of a word. |
static java.lang.String |
STEM
Lucene field used for the stemmed keyword of a word. |
static java.lang.String |
TRANSLATION
Lucene field used for the translation of a word. |
Constructor Summary | |
LuceneDictionary()
|
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 |
getFile()
|
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 |
static void |
main(java.lang.String[] args)
|
DoublyLinkedList |
matchPrefix(java.lang.String prefix)
This is quite slow!!! |
void |
open()
Opens connection to datasource |
void |
setFile(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. |
void |
write(Translation t)
|
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.IDictionary |
keys |
Methods inherited from interface textmaven.dictionaries.IBaseDictionary |
getDescription, getId, getLanguage, setDescription, setId, setLanguage |
Field Detail |
public static final java.lang.String KEYWORD
Translation.getKey()
,
Constant Field Valuespublic static final java.lang.String STEM
public static final java.lang.String MEANING
public static final java.lang.String TRANSLATION
Translation.getTranslation()
,
Constant Field Valuespublic static final java.lang.String SOURCE
Translation.getSource()
,
Constant Field Valuespublic static final org.apache.lucene.analysis.Analyzer ANALYZER
Constructor Detail |
public LuceneDictionary()
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
IDictionary.translations()
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 write(Translation t)
write
in interface IDictionaryWriter
public java.lang.String getFile()
public void setFile(java.lang.String fileBaseName)
fileBaseName
- The fileBaseName to set.public void open()
IBaseDictionary
open
in interface IBaseDictionary
open
in class Dictionary
IBaseDictionary.open()
public void close()
IBaseDictionary
close
in interface IBaseDictionary
close
in class Dictionary
IBaseDictionary.close()
public DoublyLinkedList matchPrefix(java.lang.String prefix)
IDictionary.keysWithPrefix(java.lang.String)
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |