Package net.didion.jwnl.princeton.data
Class AbstractPrincetonFileDictionaryElementFactory
- java.lang.Object
-
- net.didion.jwnl.princeton.data.AbstractPrincetonFileDictionaryElementFactory
-
- All Implemented Interfaces:
FileDictionaryElementFactory,Createable
- Direct Known Subclasses:
PrincetonWN16FileDictionaryElementFactory,PrincetonWN17FileDictionaryElementFactory
public abstract class AbstractPrincetonFileDictionaryElementFactory extends java.lang.Object implements FileDictionaryElementFactory
FileDictionaryElementFactorythat parses lines from the dictionary files distributed by the WordNet team at Princeton's Cognitive Science department.
-
-
Field Summary
Fields Modifier and Type Field Description private static MessageLog_log
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPrincetonFileDictionaryElementFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExccreateExc(POS pos, java.lang.String line)Create an Exc from a line in an exception file.IndexWordcreateIndexWord(POS pos, java.lang.String line)Creates an IndexWord from a line in an index file.SynsetcreateSynset(POS pos, java.lang.String line)Creates a synset from a line in a data file.protected WordcreateWord(Synset synset, int index, java.lang.String lemma)Creates a word, also access the sense.idx file.-
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.util.factory.Createable
create
-
-
-
-
Field Detail
-
_log
private static final MessageLog _log
-
-
Method Detail
-
createIndexWord
public IndexWord createIndexWord(POS pos, java.lang.String line)
Description copied from interface:FileDictionaryElementFactoryCreates an IndexWord from a line in an index file.- Specified by:
createIndexWordin interfaceFileDictionaryElementFactory- Parameters:
pos- - the part of speechline- - unparsed line- Returns:
- indexword
-
createSynset
public Synset createSynset(POS pos, java.lang.String line)
Description copied from interface:FileDictionaryElementFactoryCreates a synset from a line in a data file.- Specified by:
createSynsetin interfaceFileDictionaryElementFactory- Parameters:
pos- - the part of speechline- - unparsed line- Returns:
- synset
-
createWord
protected Word createWord(Synset synset, int index, java.lang.String lemma)
Creates a word, also access the sense.idx file.- Parameters:
synset-index-lemma-- Returns:
-
createExc
public Exc createExc(POS pos, java.lang.String line)
Description copied from interface:FileDictionaryElementFactoryCreate an Exc from a line in an exception file.- Specified by:
createExcin interfaceFileDictionaryElementFactory- Parameters:
pos- - the part of speechline- - unparsed line- Returns:
- exception
-
-