net.didion.jwnl.princeton.data
Class PrincetonWN30DatabaseDictionaryElementFactory

java.lang.Object
  extended by net.didion.jwnl.princeton.data.AbstractPrincetonDatabaseDictionaryElementFactory
      extended by net.didion.jwnl.princeton.data.PrincetonWN30DatabaseDictionaryElementFactory
All Implemented Interfaces:
DatabaseDictionaryElementFactory, Createable

public class PrincetonWN30DatabaseDictionaryElementFactory
extends AbstractPrincetonDatabaseDictionaryElementFactory

Supports the wordnet 3.0 database, including sense key and usage count information.

Author:
brett

Constructor Summary
PrincetonWN30DatabaseDictionaryElementFactory()
          Initialize the factory.
 
Method Summary
 Object create(Map params)
          Creates a blank factory, takes no parameters.
 Synset createSynset(POS pos, long offset, ResultSet synset, ResultSet words, ResultSet pointers, ResultSet verbFrames)
          Create a synset.
protected  Word createWord(Synset synset, int index, String lemma, String senseKey, int usageCnt)
          Creates a word object from.
 
Methods inherited from class net.didion.jwnl.princeton.data.AbstractPrincetonDatabaseDictionaryElementFactory
createExc, createIndexWord, createWord
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrincetonWN30DatabaseDictionaryElementFactory

public PrincetonWN30DatabaseDictionaryElementFactory()
Initialize the factory.

Method Detail

create

public Object create(Map params)
              throws JWNLException
Creates a blank factory, takes no parameters.

Throws:
JWNLException

createSynset

public Synset createSynset(POS pos,
                           long offset,
                           ResultSet synset,
                           ResultSet words,
                           ResultSet pointers,
                           ResultSet verbFrames)
                    throws SQLException
Create a synset.

Specified by:
createSynset in interface DatabaseDictionaryElementFactory
Overrides:
createSynset in class AbstractPrincetonDatabaseDictionaryElementFactory
Parameters:
pos - - the part of speech
offset - - the file offset
synset - - the result set
words - - the words composing the synset
pointers - - the pointers
verbFrames - - the verbFrames
Returns:
Synset - the created synset
Throws:
SQLException

createWord

protected Word createWord(Synset synset,
                          int index,
                          String lemma,
                          String senseKey,
                          int usageCnt)
Creates a word object from.

Parameters:
synset - - the synset this word belongs to
index - - the index of this word
lemma - - phrase defintion
senseKey - - the sense key
usageCnt - - the tagged usage count
Returns:
word


Copyright © 2011. All Rights Reserved.