public class WekaBagOfWordsExporterImpl extends AbstractBagOfWordsExporter implements WekaBagOfWordsExporter
jdbcTemplate, simpleJdbcTemplate, transactionManager, txNew
Constructor and Description |
---|
WekaBagOfWordsExporterImpl() |
Modifier and Type | Method and Description |
---|---|
void |
exportBagOfWords(String propertyFile) |
void |
exportBagOfWords(String propertyFile,
BagOfWordsDecorator bDecorator) |
void |
exportBagOfWords(String arffRelation,
String instanceClassQuery,
String instanceNumericWordQuery,
String instanceNominalWordQuery,
BufferedWriter writer) |
void |
exportBagOfWords(String arffRelation,
String instanceClassQuery,
String instanceNumericWordQuery,
String instanceNominalWordQuery,
BufferedWriter writer,
BagOfWordsDecorator bDecorator) |
protected void |
getInstances(String sql,
BagOfWordsData bagOfWordsData) |
protected weka.core.Instances |
initializeInstances(String arffRelation,
BagOfWordsData bagOfWordsData,
BagOfWordsDecorator bDecorator)
initialize the weka Instances
|
addNominalWordToInstance, addNumericWordToInstance, getDataSource, getNominalInstanceWords, getNumericInstanceWords, getTransactionManager, loadData, loadProperties, setDataSource, setTransactionManager
public void exportBagOfWords(String arffRelation, String instanceClassQuery, String instanceNumericWordQuery, String instanceNominalWordQuery, BufferedWriter writer) throws IOException
exportBagOfWords
in interface WekaBagOfWordsExporter
arffRelation
- relation of arff file to generateinstanceClassQuery
- query with result columns: column 1 - integer instance id,
column 2 - string class labelinstanceNumericWordQuery
- query with result colums: column 1 - integer instance id,
column 2 - word, column 3 - numeric word valueinstanceNominalWordQuery
- query with result colums: column 1 - integer instance id,
column 2 - word, column 3 - string word valuewriter
- where arff file will be writtenIOException
public void exportBagOfWords(String arffRelation, String instanceClassQuery, String instanceNumericWordQuery, String instanceNominalWordQuery, BufferedWriter writer, BagOfWordsDecorator bDecorator) throws IOException
IOException
public void exportBagOfWords(String propertyFile) throws IOException
exportBagOfWords
in interface BagOfWordsExporter
propertyFile
- .xml/.properties file with following properties:
IOException
public void exportBagOfWords(String propertyFile, BagOfWordsDecorator bDecorator) throws IOException
exportBagOfWords
in interface WekaBagOfWordsExporter
IOException
protected weka.core.Instances initializeInstances(String arffRelation, BagOfWordsData bagOfWordsData, BagOfWordsDecorator bDecorator)
arffRelation
- sql
- classLabels
- idfMap
- docLengthMap
- protected void getInstances(String sql, BagOfWordsData bagOfWordsData)
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.