Package net.didion.jwnl.princeton.file
Class AbstractPrincetonDictionaryFile
java.lang.Object
net.didion.jwnl.dictionary.file.AbstractDictionaryFile
net.didion.jwnl.princeton.file.AbstractPrincetonDictionaryFile
- All Implemented Interfaces:
DictionaryFile
- Direct Known Subclasses:
AbstractPrincetonRandomAccessDictionaryFile
,PrincetonObjectDictionaryFile
AbstractDictionaryFile
that uses file names compatible with Princeton's distribution of WordNet.
The filenames associated are:
WINDOWS: invalid input: '<'noun, verb, adj, adv>.invalid input: '<'idx, dat, exc>
MAC, UNIX: invalid input: '<'index, data>.invalid input: '<'noun, verb, adj, adv>, invalid input: '<'noun, verb, adj, adv>.exc-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Map
private static final Map
private static final String
private static final String
private static final String
private static final String
Fields inherited from interface net.didion.jwnl.dictionary.file.DictionaryFile
COMMENT_HEADER
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractPrincetonDictionaryFile
(String path, POS pos, DictionaryFileType fileType) -
Method Summary
Modifier and TypeMethodDescriptionprivate String
getExtension
(POS pos) protected String
Build a filename from the part-of-speech and the file type.private String
makeNonWindowsFilename
(String posStr, String fileTypeStr) private String
makeWindowsFilename
(String posStr, String fileTypeStr) Makes a windows file type string.Methods inherited from class net.didion.jwnl.dictionary.file.AbstractDictionaryFile
getFile, getFileType, getPOS, open, openFile
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.didion.jwnl.dictionary.file.DictionaryFile
close, isOpen, newInstance
-
Field Details
-
NOUN_EXT
- See Also:
-
VERB_EXT
- See Also:
-
ADJECTIVE_EXT
- See Also:
-
ADVERB_EXT
- See Also:
-
_posToExtMap
-
_fileTypeToFileNameMap
-
-
Constructor Details
-
AbstractPrincetonDictionaryFile
public AbstractPrincetonDictionaryFile() -
AbstractPrincetonDictionaryFile
-
-
Method Details
-
makeFilename
Description copied from class:AbstractDictionaryFile
Build a filename from the part-of-speech and the file type.- Specified by:
makeFilename
in classAbstractDictionaryFile
-
makeWindowsFilename
Makes a windows file type string. Typically of the form "data.noun" or "index.noun".- Parameters:
posStr
- the part of speechfileTypeStr
- the file type, data, index, etc.- Returns:
-
makeNonWindowsFilename
-
getExtension
-
getFileNames
-