at.tuwien.ifs.somtoolbox.database
Class Index2DatabaseImporter
java.lang.Object
at.tuwien.ifs.somtoolbox.database.Index2DatabaseImporter
public class Index2DatabaseImporter
- extends Object
Reads data from a TeSeTool generated (Lucene-based) index and writes it to a database.
- Version:
- $Id: Index2DatabaseImporter.java 3589 2010-05-21 10:42:01Z mayer $
- Author:
- Rudolf Mayer
Method Summary |
private void |
executeDocumentTermInsert(int documentNumber,
int termNumber,
int rawTermFrequency,
double weight,
double weightNormalised)
|
private void |
initDocumentTermPreparedStatement()
|
void |
writeInputVector(at.ec3.DoubleMatrix inputVectorMatrix,
HashMap<Integer,Object> labelMap)
Writes the input vectors from an already caluclated tfxidf matrix. |
void |
writeInputVector(at.ec3.IntMatrix tfMatrix,
Vector<String> selectedTerms,
HashMap<Integer,Object> allTerms,
HashMap<Integer,Object> labelMap)
Writes the vector from a term-frequency matrix. |
void |
writeTemplateVector(at.ec3.IntMatrix tfMatrix,
Vector<String> selectedTerms,
HashMap<Integer,Object> allTerms)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
templateFields
public static final String[] templateFields
documentTableFields
public static final String[] documentTableFields
documentTermTableFields
public static final String[] documentTermTableFields
dbConnector
MySQLConnector dbConnector
documentTermPreparedStatement
private PreparedStatement documentTermPreparedStatement
Index2DatabaseImporter
public Index2DatabaseImporter(String databaseServerAddress,
String databaseName,
String user,
String password,
String databaseTableNamePrefix)
throws SQLException,
IOException
- Throws:
SQLException
IOException
writeTemplateVector
public void writeTemplateVector(at.ec3.IntMatrix tfMatrix,
Vector<String> selectedTerms,
HashMap<Integer,Object> allTerms)
throws SQLException
- Throws:
SQLException
initDocumentTermPreparedStatement
private void initDocumentTermPreparedStatement()
throws SQLException
- Throws:
SQLException
executeDocumentTermInsert
private void executeDocumentTermInsert(int documentNumber,
int termNumber,
int rawTermFrequency,
double weight,
double weightNormalised)
throws SQLException
- Throws:
SQLException
writeInputVector
public void writeInputVector(at.ec3.IntMatrix tfMatrix,
Vector<String> selectedTerms,
HashMap<Integer,Object> allTerms,
HashMap<Integer,Object> labelMap)
throws SQLException
- Writes the vector from a term-frequency matrix.
- Throws:
SQLException
writeInputVector
public void writeInputVector(at.ec3.DoubleMatrix inputVectorMatrix,
HashMap<Integer,Object> labelMap)
throws SQLException
- Writes the input vectors from an already caluclated tfxidf matrix.
- Throws:
SQLException