net.didion.jwnl.princeton.data
Class AbstractPrincetonFileDictionaryElementFactory

java.lang.Object
  extended by net.didion.jwnl.princeton.data.AbstractPrincetonFileDictionaryElementFactory
All Implemented Interfaces:
FileDictionaryElementFactory, Createable
Direct Known Subclasses:
PrincetonWN16FileDictionaryElementFactory, PrincetonWN17FileDictionaryElementFactory

public abstract class AbstractPrincetonFileDictionaryElementFactory
extends Object
implements FileDictionaryElementFactory

FileDictionaryElementFactory that parses lines from the dictionary files distributed by the WordNet team at Princeton's Cognitive Science department.


Constructor Summary
protected AbstractPrincetonFileDictionaryElementFactory()
           
 
Method Summary
 Exc createExc(POS pos, String line)
          Create an Exc from a line in an exception file.
 IndexWord createIndexWord(POS pos, String line)
          Creates an IndexWord from a line in an index file.
 Synset createSynset(POS pos, String line)
          Creates a synset from a line in a data file.
protected  Word createWord(Synset synset, int index, 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
 

Constructor Detail

AbstractPrincetonFileDictionaryElementFactory

protected AbstractPrincetonFileDictionaryElementFactory()
Method Detail

createIndexWord

public IndexWord createIndexWord(POS pos,
                                 String line)
Description copied from interface: FileDictionaryElementFactory
Creates an IndexWord from a line in an index file.

Specified by:
createIndexWord in interface FileDictionaryElementFactory
Parameters:
pos - - the part of speech
line - - unparsed line
Returns:
indexword

createSynset

public Synset createSynset(POS pos,
                           String line)
Description copied from interface: FileDictionaryElementFactory
Creates a synset from a line in a data file.

Specified by:
createSynset in interface FileDictionaryElementFactory
Parameters:
pos - - the part of speech
line - - unparsed line
Returns:
synset

createWord

protected Word createWord(Synset synset,
                          int index,
                          String lemma)
Creates a word, also access the sense.idx file.

Parameters:
synset -
index -
lemma -
Returns:

createExc

public Exc createExc(POS pos,
                     String line)
Description copied from interface: FileDictionaryElementFactory
Create an Exc from a line in an exception file.

Specified by:
createExc in interface FileDictionaryElementFactory
Parameters:
pos - - the part of speech
line - - unparsed line
Returns:
exception


Copyright © 2011. All Rights Reserved.