net.didion.jwnl.utilities
Class DictionaryToDatabase

java.lang.Object
  extended by net.didion.jwnl.utilities.DictionaryToDatabase

public class DictionaryToDatabase
extends java.lang.Object

DictionaryToDatabase is used to transfer a WordNet file database into an actual database structure.

Author:
brett

Constructor Summary
DictionaryToDatabase(java.sql.Connection conn)
          Create a new DictionaryToDatabase with a database connection.
 
Method Summary
 void createTables(java.lang.String scriptFilePath)
          Create the database tables.
 void insertData()
          Inserts the data into the database.
static void main(java.lang.String[] args)
          Run the program, requires 4 arguments.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DictionaryToDatabase

public DictionaryToDatabase(java.sql.Connection conn)
Create a new DictionaryToDatabase with a database connection. JWNL already initialized.

Parameters:
conn - - the database connection
Method Detail

main

public static void main(java.lang.String[] args)
Run the program, requires 4 arguments. See DictionaryToDatabase.txt for more documentation.

Parameters:
args -

createTables

public void createTables(java.lang.String scriptFilePath)
                  throws java.io.IOException,
                         java.sql.SQLException
Create the database tables.

Parameters:
scriptFilePath - - the sql script filename
Throws:
java.io.IOException
java.sql.SQLException

insertData

public void insertData()
                throws java.lang.Exception
Inserts the data into the database. Iterates through the various POS, then stores all the index words, synsets, exceptions of that POS.

Throws:
java.lang.Exception