net.didion.jwnl.utilities
Class DictionaryToDatabaseWithUsageCount

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

public class DictionaryToDatabaseWithUsageCount
extends Object

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

Author:
brett

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

Constructor Detail

DictionaryToDatabaseWithUsageCount

public DictionaryToDatabaseWithUsageCount(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(String[] args)
Run the program, requires 4 arguments. See DictionaryToDatabase.txt for more documentation.

Parameters:
args -

createTables

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

Parameters:
scriptFilePath - - the sql script filename
Throws:
IOException
SQLException

insertData

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

Throws:
Exception


Copyright © 2011. All Rights Reserved.