|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectweka.filters.Filter
gate.creole.ml.weka.StringToNominalFilter
This filter converts one or more string attributes from the input dataset into nominal attributes.
| Nested Class Summary | |
protected static class |
StringToNominalFilter.AttributeData
Stores data about one attribute to be converted. |
protected static class |
StringToNominalFilter.WordCount
|
protected static class |
StringToNominalFilter.WordData
|
| Field Summary | |
protected List |
attributesData
|
static String |
FREQUENCY
Constant for conversion method. |
protected static Vector |
optionsDesc
The description for the options accepted by this filter |
static String |
TFIDF
Constant for conversion method. |
| Fields inherited from class weka.filters.Filter |
m_NewBatch |
| Constructor Summary | |
StringToNominalFilter()
Anonymous constructor. |
|
| Method Summary | |
protected int |
addLeaves(Map map)
|
boolean |
batchFinished()
Signifies that this batch of input to the filter is finished. |
protected void |
buildOutputFormat()
Called after a batch of input has finished. |
String[] |
getOptions()
|
boolean |
input(weka.core.Instance instance)
Input an instance for filtering. |
protected boolean |
isString(int index)
Checks whether the aqttribute at a particular index in the input dataset is string. |
Enumeration |
listOptions()
|
static void |
main(String[] args)
|
protected void |
parseOptions()
Parses the set of options supplied to this filter |
protected weka.core.Instance |
processInstance(weka.core.Instance inputInstance)
Once the output format is defined this method can be used to covert input instances into output instances. |
boolean |
setInputFormat(weka.core.Instances instanceInfo)
Sets the format of the input instances. |
void |
setOptions(String[] options)
|
| Methods inherited from class weka.filters.Filter |
batchFilterFile, bufferInput, copyStringValues, copyStringValues, filterFile, flushInput, getInputFormat, getInputStringIndex, getOutputFormat, getOutputStringIndex, getStringIndices, inputFormat, isOutputFormatDefined, numPendingOutput, output, outputFormat, outputFormatPeek, outputPeek, push, resetQueue, setOutputFormat, useFilter |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected List attributesData
protected static Vector optionsDesc
public static final String FREQUENCY
public static final String TFIDF
| Constructor Detail |
public StringToNominalFilter()
| Method Detail |
public boolean setInputFormat(weka.core.Instances instanceInfo)
throws Exception
instanceInfo - an Instances object containing the input
instance structure (any instances contained in the object are
ignored - only the structure is required).
weka.core.UnsupportedAttributeTypeException - if the selected attribute
is not a string attribute.
Exceptionpublic boolean input(weka.core.Instance instance)
instance - the input instance.
IllegalStateException - if no input structure has been defined.public boolean batchFinished()
IllegalStateException - if no input structure has been defined.protected void buildOutputFormat()
public static void main(String[] args)
protected int addLeaves(Map map)
protected weka.core.Instance processInstance(weka.core.Instance inputInstance)
inputInstance -
protected boolean isString(int index)
index -
public Enumeration listOptions()
listOptions in interface weka.core.OptionHandler
public void setOptions(String[] options)
throws Exception
setOptions in interface weka.core.OptionHandlerExceptionpublic String[] getOptions()
getOptions in interface weka.core.OptionHandler
protected void parseOptions()
throws Exception
Exception
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||