@KFStep(name="SubstringLabeler", category="Tools", toolTipText="Label instances according to substring matches in String attributes", iconPath="weka/gui/knowledgeflow/icons/DefaultFilter.gif") public class SubstringLabeler extends BaseStep
| Constructor and Description |
|---|
SubstringLabeler() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getConsumeNonMatching()
Get whether instances that do not match any of the rules should be
"consumed" rather than output with a missing value set for the new
attribute.
|
String |
getCustomEditorForStep()
Return the fully qualified name of a custom editor component (JComponent)
to use for editing the properties of the step.
|
List<String> |
getIncomingConnectionTypes()
Get a list of incoming connection types that this step can accept.
|
String |
getMatchAttributeName()
Get the name of the new attribute that is created to indicate the match
|
String |
getMatchDetails()
Get the internally encoded list of match rules
|
boolean |
getNominalBinary()
Get whether the new attribute created should be a nominal binary attribute
rather than a numeric binary attribute.
|
List<String> |
getOutgoingConnectionTypes()
Get a list of outgoing connection types that this step can produce.
|
Instances |
outputStructureForConnectionType(String connectionName)
If possible, get the output structure for the named connection type as a
header-only set of instances.
|
void |
processIncoming(Data data)
Process an incoming data payload (if the step accepts incoming connections)
|
void |
setConsumeNonMatching(boolean consume)
Set whether instances that do not match any of the rules should be
"consumed" rather than output with a missing value set for the new
attribute.
|
void |
setMatchAttributeName(String name)
Set the name of the new attribute that is created to indicate the match
|
void |
setMatchDetails(String details)
Set internally encoded list of match rules
|
void |
setNominalBinary(boolean nom)
Set whether the new attribute created should be a nominal binary attribute
rather than a numeric binary attribute.
|
void |
stepInit()
Initialize the step.
|
environmentSubstitute, getDefaultSettings, getInteractiveViewers, getInteractiveViewersImpls, getName, getStepManager, globalInfo, isResourceIntensive, isStopRequested, setName, setStepIsResourceIntensive, setStepManager, start, stop@ProgrammaticProperty public void setMatchDetails(String details)
details - the list of match rulespublic String getMatchDetails()
@OptionMetadata(displayName="Make a nominal binary attribute", description="Whether to encode the new attribute as nominal when it is binary (as opposed to numeric)", displayOrder=1) public void setNominalBinary(boolean nom)
nom - true if the attribute should be a nominal binary onepublic boolean getNominalBinary()
@OptionMetadata(displayName="Consume non matching instances", description="Instances that do not match any rules will be consumed, rather than being output with a missing value for the new attribute", displayOrder=2) public void setConsumeNonMatching(boolean consume)
consume - true if non matching instances should be consumed by the
component.public boolean getConsumeNonMatching()
@OptionMetadata(displayName="Name of the new attribute", description="Name to give the new attribute", displayOrder=0) public void setMatchAttributeName(String name)
name - the name of the new attributepublic String getMatchAttributeName()
public void stepInit()
throws WekaException
StepWekaException - if a problem occurs during initializationpublic List<String> getIncomingConnectionTypes()
Steppublic List<String> getOutgoingConnectionTypes()
Steppublic void processIncoming(Data data) throws WekaException
BaseStepprocessIncoming in interface BaseStepExtenderprocessIncoming in interface StepprocessIncoming in class BaseStepdata - the payload to processWekaException - if a problem occurspublic Instances outputStructureForConnectionType(String connectionName) throws WekaException
BaseStepoutputStructureForConnectionType in interface StepoutputStructureForConnectionType in class BaseStepconnectionName - the name of the connection type to get the output
structure forWekaException - if a problem occurspublic String getCustomEditorForStep()
BaseStepgetCustomEditorForStep in interface StepgetCustomEditorForStep in class BaseStepCopyright © 2016 University of Waikato, Hamilton, NZ. All Rights Reserved.