edu.princeton.cogsci.wn.sql
Class SQLWordNetImpl

java.lang.Object
  |
  +--edu.princeton.cogsci.wn.WordNetImpl
        |
        +--edu.princeton.cogsci.wn.sql.SQLWordNetImpl

public class SQLWordNetImpl
extends WordNetImpl
implements Constants


Field Summary
 java.sql.Connection mysqlConnection
           
 java.util.Hashtable synsetTable
           
 java.util.Hashtable wordSenseTable
           
 
Fields inherited from interface edu.princeton.cogsci.wn.Constants
ADJECTIVE, ADVERB, ALL_SENSES, ANTONYM, ANY_POS, ANY_RELATION, ATTRIBUTE, CAUSE_TO, ENTAILS, HAS_MEMBER, HAS_PART, HAS_STUFF, HOLONYM, HYPERNYM, HYPONYM, IS_MEMBER_OF, IS_PART_OF, IS_STUFF_OF, MERONYM, NOUN, PARTICIPLE, PERTAINYM, posChars, posStrings, posSymbols, relationAbbrevs, relationNames, relationSymbols, SATELLITE, SEE_ALSO, SEMANTIC, SIMILAR_TO, VERB, VERBGROUP
 
Constructor Summary
SQLWordNetImpl()
           
SQLWordNetImpl(java.lang.String host, java.lang.String user, java.lang.String pass, java.lang.String db, int port)
           
 
Method Summary
 void addSynset(Synset ss, java.lang.String user, java.lang.String pass)
           
 void closeSQLConnection()
           
 java.lang.String getTitle()
          Returns this implementation's name.
 java.lang.String[] lookupBaseForms(java.lang.String word)
          Performs morphological analysis on the given word and returns all possible base forms in the given part of speech.
 Synset lookupSynset(SynsetKey key)
          Returns the synset specified by the given key.
 Synset[] lookupSynsetAllSenses(java.lang.String word, int pos)
          Returns the synsets specified by all senses of the given word.
 Synset[] lookupSynsetByGloss(java.lang.String keyword, int gloss)
           
 SynsetKey lookupSynsetKey(java.lang.String canonicalNumberSynsetKeyDataVariableBytes)
          Returns the synset key given by its string representation.
 SynsetKey lookupSynsetKey(java.lang.String word, int pos, int sense)
          Returns the synset key associated with the parameters, or null if it doesn't exist.
 WordSense lookupWordSense(WordSenseKey key)
          Returns the word sense specified by the given key.
 WordSenseKey lookupWordSenseKey(java.lang.String key)
          Returns the word sense key given by its string representation.
 WordSenseKey lookupWordSenseKey(java.lang.String word, int pos, int sense)
          Returns the word sense key associated with the parameters, or null if it doesn't exist.
static void main(java.lang.String[] args)
           
 void reassignSynset(SynsetKey sk, int oldOwner, java.lang.String user, java.lang.String pass)
           
 void removeSynset(SynsetKey sk, java.lang.String reason, java.lang.String user, java.lang.String pass)
           
 void updateSynset(SynsetKey sk, Synset ss, java.lang.String user, java.lang.String pass)
           
 
Methods inherited from class edu.princeton.cogsci.wn.WordNetImpl
getCurrentWNI, lookupSynsetAllForms, setCurrentWNI, toCanonicalForm, toRelation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mysqlConnection

public java.sql.Connection mysqlConnection

synsetTable

public java.util.Hashtable synsetTable

wordSenseTable

public java.util.Hashtable wordSenseTable
Constructor Detail

SQLWordNetImpl

public SQLWordNetImpl()
               throws WordNetException

SQLWordNetImpl

public SQLWordNetImpl(java.lang.String host,
                      java.lang.String user,
                      java.lang.String pass,
                      java.lang.String db,
                      int port)
               throws WordNetException
Method Detail

main

public static void main(java.lang.String[] args)

getTitle

public java.lang.String getTitle()
Description copied from class: WordNetImpl
Returns this implementation's name.
Overrides:
getTitle in class WordNetImpl

closeSQLConnection

public void closeSQLConnection()

lookupWordSenseKey

public WordSenseKey lookupWordSenseKey(java.lang.String word,
                                       int pos,
                                       int sense)
                                throws WordNetException
Description copied from class: WordNetImpl
Returns the word sense key associated with the parameters, or null if it doesn't exist.
Overrides:
lookupWordSenseKey in class WordNetImpl

lookupSynsetKey

public SynsetKey lookupSynsetKey(java.lang.String word,
                                 int pos,
                                 int sense)
                          throws WordNetException
Description copied from class: WordNetImpl
Returns the synset key associated with the parameters, or null if it doesn't exist.
Overrides:
lookupSynsetKey in class WordNetImpl

lookupWordSense

public WordSense lookupWordSense(WordSenseKey key)
                          throws WordNetException
Description copied from class: WordNetImpl
Returns the word sense specified by the given key.
Overrides:
lookupWordSense in class WordNetImpl

lookupSynset

public Synset lookupSynset(SynsetKey key)
                    throws WordNetException
Description copied from class: WordNetImpl
Returns the synset specified by the given key.
Overrides:
lookupSynset in class WordNetImpl

lookupSynsetByGloss

public Synset[] lookupSynsetByGloss(java.lang.String keyword,
                                    int gloss)
Overrides:
lookupSynsetByGloss in class WordNetImpl

lookupWordSenseKey

public WordSenseKey lookupWordSenseKey(java.lang.String key)
Description copied from class: WordNetImpl
Returns the word sense key given by its string representation. This method should be the inverse of WordSenseKey.toString( ). It may assume that the string representation was created from a word sense key from this implementation.
Overrides:
lookupWordSenseKey in class WordNetImpl
Tags copied from class: WordNetImpl
Throws:
WordNetException - if the string representation is malformed
See Also:
WordSenseKey#toString

lookupSynsetAllSenses

public Synset[] lookupSynsetAllSenses(java.lang.String word,
                                      int pos)
                               throws WordNetException
Description copied from class: WordNetImpl
Returns the synsets specified by all senses of the given word.
Overrides:
lookupSynsetAllSenses in class WordNetImpl

lookupSynsetKey

public SynsetKey lookupSynsetKey(java.lang.String canonicalNumberSynsetKeyDataVariableBytes)
Description copied from class: WordNetImpl
Returns the synset key given by its string representation. This method should be the inverse of SynsetKey.toString( ). It may assume that the string representation was created from a synset key from this implementation.
Overrides:
lookupSynsetKey in class WordNetImpl
Tags copied from class: WordNetImpl
Throws:
WordNetException - if the string representation is malformed
See Also:
SynsetKey#toString

lookupBaseForms

public java.lang.String[] lookupBaseForms(java.lang.String word)
Description copied from class: WordNetImpl
Performs morphological analysis on the given word and returns all possible base forms in the given part of speech.
Overrides:
lookupBaseForms in class WordNetImpl

updateSynset

public void updateSynset(SynsetKey sk,
                         Synset ss,
                         java.lang.String user,
                         java.lang.String pass)
                  throws WordNetEditException
Overrides:
updateSynset in class WordNetImpl

addSynset

public void addSynset(Synset ss,
                      java.lang.String user,
                      java.lang.String pass)
               throws WordNetEditException
Overrides:
addSynset in class WordNetImpl

removeSynset

public void removeSynset(SynsetKey sk,
                         java.lang.String reason,
                         java.lang.String user,
                         java.lang.String pass)
                  throws WordNetEditException
Overrides:
removeSynset in class WordNetImpl

reassignSynset

public void reassignSynset(SynsetKey sk,
                           int oldOwner,
                           java.lang.String user,
                           java.lang.String pass)
                    throws WordNetEditException
Overrides:
reassignSynset in class WordNetImpl