|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
weka.gui.beans.SubstringLabeler
@KFStep(category="Tools",
toolTipText="Label instances according to substring matches in String attributes")
public class SubstringLabelerA bean that finds matches in string attribute values (using either substring or regular expression matches) and labels the instance (sets the value of a new attribute) according to the supplied label for the matching rule. The new label attribute can be either multivalued nominal (if each match rule specified has an explicit label associated with it) or, binary numeric/nominal to indicate that one of the match rules has matched or not matched.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.BaselineResizeBehavior |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent |
|---|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
SubstringLabeler()
Constructor |
|
| Method Summary | |
|---|---|
void |
acceptDataSet(DataSetEvent e)
Accept and process a data set event |
void |
acceptInstance(InstanceEvent e)
Accept and process an instance event |
void |
acceptTestSet(TestSetEvent e)
Accept and process a test set event |
void |
acceptTrainingSet(TrainingSetEvent e)
Accept and process a training set event |
void |
addDataSourceListener(DataSourceListener dsl)
Add a datasource listener |
void |
addInstanceListener(InstanceListener dsl)
Add an instance listener |
boolean |
connectionAllowed(EventSetDescriptor esd)
Returns true if, at this time, the object will accept a connection via the named event |
boolean |
connectionAllowed(String eventName)
Returns true if, at this time, the object will accept a connection via the named event |
void |
connectionNotification(String eventName,
Object source)
Notify this object that it has been registered as a listener with a source for receiving events described by the named event This object is responsible for recording this fact. |
void |
disconnectionNotification(String eventName,
Object source)
Notify this object that it has been deregistered as a listener with a source for named event. |
boolean |
eventGeneratable(String eventName)
Returns true if, at the current time, the named event could be generated. |
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 |
getCustomName()
Get the custom (descriptive) name for this bean (if one has been set) |
String |
getMatchAttributeName()
|
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. |
BeanVisual |
getVisual()
Get the visual representation |
String |
globalInfo()
Help information suitable for displaying in the GUI. |
boolean |
isBusy()
Returns true if. |
void |
removeDataSourceListener(DataSourceListener dsl)
Remove a datasource listener |
void |
removeInstanceListener(InstanceListener dsl)
Remove an instance listener |
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 |
setCustomName(String name)
Set a custom (descriptive) name for this bean |
void |
setEnvironment(Environment env)
Set environment variables to use |
void |
setLog(Logger logger)
Set a logger |
void |
setMatchAttributeName(String name)
|
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 |
setVisual(BeanVisual newVisual)
Set a new visual representation |
void |
stop()
Stop any processing that the bean might be doing. |
void |
useDefaultVisual()
Use the default visual representation |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SubstringLabeler()
| Method Detail |
|---|
public String globalInfo()
public void setMatchDetails(String details)
details - the list of match rulespublic String getMatchDetails()
public void setNominalBinary(boolean nom)
nom - true if the attribute should be a nominal binary onepublic boolean getNominalBinary()
public void setConsumeNonMatching(boolean consume)
consume - true if non matching instances should be consumed by
the component.public boolean getConsumeNonMatching()
public void setMatchAttributeName(String name)
public String getMatchAttributeName()
public void addDataSourceListener(DataSourceListener dsl)
addDataSourceListener in interface DataSourcedsl - the datasource listener to addpublic void removeDataSourceListener(DataSourceListener dsl)
removeDataSourceListener in interface DataSourcedsl - the datasource listener to removepublic void addInstanceListener(InstanceListener dsl)
addInstanceListener in interface DataSourcedsl - the instance listener to addpublic void removeInstanceListener(InstanceListener dsl)
removeInstanceListener in interface DataSourcedsl - the instance listener to removepublic void setEnvironment(Environment env)
setEnvironment in interface EnvironmentHandlerenv - the environment variables to
usepublic boolean eventGeneratable(String eventName)
eventGeneratable in interface EventConstraintseventName - the name of the event in question
public void useDefaultVisual()
useDefaultVisual in interface Visiblepublic void setVisual(BeanVisual newVisual)
setVisual in interface VisiblenewVisual - a BeanVisual valuepublic BeanVisual getVisual()
getVisual in interface VisibleBeanVisual valuepublic void setCustomName(String name)
setCustomName in interface BeanCommonname - the name to usepublic String getCustomName()
getCustomName in interface BeanCommonpublic void stop()
stop in interface BeanCommonpublic boolean isBusy()
isBusy in interface BeanCommonpublic void setLog(Logger logger)
setLog in interface BeanCommonlogger - a weka.gui.Logger valuepublic boolean connectionAllowed(EventSetDescriptor esd)
connectionAllowed in interface BeanCommonesd - the EventSetDescriptor for the event in question
public boolean connectionAllowed(String eventName)
connectionAllowed in interface BeanCommoneventName - the name of the event
public void connectionNotification(String eventName,
Object source)
connectionNotification in interface BeanCommoneventName - the eventsource - the source with which this object has been registered as
a listener
public void disconnectionNotification(String eventName,
Object source)
disconnectionNotification in interface BeanCommoneventName - the eventsource - the source with which this object has been registered as
a listenerpublic void acceptInstance(InstanceEvent e)
acceptInstance in interface InstanceListenere - the instance event to processpublic void acceptDataSet(DataSetEvent e)
acceptDataSet in interface DataSourceListenere - the data set event to processpublic void acceptTestSet(TestSetEvent e)
acceptTestSet in interface TestSetListenere - the test set event to processpublic void acceptTrainingSet(TrainingSetEvent e)
acceptTrainingSet in interface TrainingSetListenere - a TrainingSetEvent value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||