|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.extraction.Extractor
weka.extraction.ClusteringExtractor
An abstract extractor class. Takes a set of objects and trains on it; then can be used for extraction on a testing set.
Field Summary | |
protected Clusterer |
m_clusterer
The clusterer |
protected Extractor |
m_extractor
The baseline extractor that is used |
protected int |
m_mode
|
protected boolean |
m_verbose
Verbose? |
static int |
MODE_DOCUMENT_CLUSTERS
Two fundamental modes. |
static int |
MODE_MIXED
|
static int |
MODE_SEGMENT_CLUSTERS
|
static Tag[] |
TAGS_CLUSTERING_MODE
|
Fields inherited from class weka.extraction.Extractor |
m_statistics |
Constructor Summary | |
ClusteringExtractor()
A default constructor |
Method Summary | |
static java.lang.String |
concatStringArray(java.lang.String[] strings)
A little helper to create a single String from an array of Strings |
Clusterer |
getClusterer()
Get the clusterer |
Extractor |
getExtractor()
Get the extractor |
SelectedTag |
getMode()
return the clustering mode |
java.lang.String[] |
getOptions()
Gets the current settings of Greedy Agglomerative Clustering |
boolean |
getVerbose()
get the verbosity level of the clusterer |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options |
void |
setClusterer(Clusterer clusterer)
Set the clusterer |
void |
setExtractor(Extractor extractor)
Set the extractor |
void |
setMode(SelectedTag mode)
Set the clustering mode |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setVerbose(boolean verbose)
set the verbosity level of the clusterer |
void |
testExtractor(Instances testData,
java.util.HashMap docFillerMap)
Perform extraction on a set of data. |
void |
trainExtractor(Instances labeledData,
Instances unlabeledData)
Given training data, train the extractor |
Methods inherited from class weka.extraction.Extractor |
forName, getStatistics |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Extractor m_extractor
protected Clusterer m_clusterer
public static final int MODE_DOCUMENT_CLUSTERS
public static final int MODE_SEGMENT_CLUSTERS
public static final int MODE_MIXED
public static final Tag[] TAGS_CLUSTERING_MODE
protected int m_mode
protected boolean m_verbose
Constructor Detail |
public ClusteringExtractor()
Method Detail |
public void trainExtractor(Instances labeledData, Instances unlabeledData) throws java.lang.Exception
trainExtractor
in class Extractor
labeledData
- a set of training dataunlabeledData
- we don't plan to use transduction here for now
java.lang.Exception
public void testExtractor(Instances testData, java.util.HashMap docFillerMap) throws java.lang.Exception
testExtractor
in class Extractor
testData
- a set of instances on which to perform extractiondocFillerMap
- a map where the uniqueID of an instance (document) is mapped to a
HashMap, which maps fillers to a list of Integer positions
java.lang.Exception
public void setMode(SelectedTag mode)
mode
- one of MODE_DOCUMENT_CLUSTERS or MODE_SEGMENT_CLUSTERSpublic SelectedTag getMode()
public void setClusterer(Clusterer clusterer)
clusterer
- the clusterer to be usedpublic Clusterer getClusterer()
public void setExtractor(Extractor extractor)
extractor
- the extractor to be usedpublic Extractor getExtractor()
public void setVerbose(boolean verbose)
verbose
- messages on(true) or off (false)public boolean getVerbose()
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-D document-clustering mode
or
-S segment-clustering mode
-E extractor-name extractor-options
extractor and its options
-C clusterer-name clusterer-options
clusterer and its options
setOptions
in interface OptionHandler
options
- the list of options as an array of strings
java.lang.Exception
- if an option is not supportedpublic static java.lang.String concatStringArray(java.lang.String[] strings)
strings
- an array of stringspublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |