Package net.didion.jwnl.utilities
Class DictionaryToMap
java.lang.Object
net.didion.jwnl.utilities.DictionaryToMap
DictionaryToMap allows you to populate and create an in-memory map of the WordNet
library. The goal of this utility is to provide a performance boost to applications
using a high quantity of API calls to the JWNL library
(such as word sense disambiguation algorithms, or dictionary services).
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDictionaryToMap
(String destDirectory, String propFile) Initalize with the given map destination directory, using the properties file(usually file_properties.xml) -
Method Summary
Modifier and TypeMethodDescriptionvoid
convert()
Converts the current Dictionary to a MapBackedDictionary.private Iterator
getIterator
(POS pos, DictionaryFileType fileType) static void
private void
serialize
(POS pos, DictionaryFileType fileType)
-
Field Details
-
_destFiles
-
-
Constructor Details
-
DictionaryToMap
Initalize with the given map destination directory, using the properties file(usually file_properties.xml)- Parameters:
destDirectory
- - destination directory for in-memory map filespropFile
- - properties file of file-based WordNet- Throws:
JWNLException
IOException
-
-
Method Details
-
convert
Converts the current Dictionary to a MapBackedDictionary.- Throws:
JWNLException
IOException
-
getIterator
- Throws:
JWNLException
-
serialize
- Throws:
JWNLException
IOException
-
main
-