Documentation of 'weka.gui.beans.SubstringReplacerRules' Java class
SubstringReplacerRules
weka.gui.beans

Class SubstringReplacerRules

  • All Implemented Interfaces:
    java.io.Serializable, EnvironmentHandler


    public class SubstringReplacerRules
    extends java.lang.Object
    implements EnvironmentHandler, java.io.Serializable
    Manages a list of match and replace rules for replacing values in string attributes
    See Also:
    Serialized Form
    • Constructor Detail

      • SubstringReplacerRules

        public SubstringReplacerRules(java.lang.String matchDetails,
                                      Instances inputStructure,
                                      java.lang.String statusMessagePrefix,
                                      Logger log,
                                      Environment env)
        Constructor
        Parameters:
        matchDetails - the internally encoded match details string
        inputStructure - the incoming instances structure
        statusMessagePrefix - an optional status message prefix string for logging
        log - the log to use (may be null)
        env - environment variables
      • SubstringReplacerRules

        public SubstringReplacerRules(java.lang.String matchDetails,
                                      Instances inputStructure)
        Constructor. Initializes with system-wide environment variables and uses no status message and no log.
        Parameters:
        matchDetails - the internally encoded match details string
        inputStructure - the incoming instances structure
    • Method Detail

      • matchRulesFromInternal

        public static java.util.List<SubstringReplacerRules.SubstringReplacerMatchRule> matchRulesFromInternal(java.lang.String matchReplaceDetails,
                                                                                                               Instances inputStructure,
                                                                                                               java.lang.String statusMessagePrefix,
                                                                                                               Logger log,
                                                                                                               Environment env)
        Get a list of match rules from an internally encoded match specification
        Parameters:
        matchReplaceDetails - the internally encoded specification of the match rules
        inputStructure - the input instances structure
        statusMessagePrefix - an optional status message prefix for logging
        log - the log to use
        env - environment variables
        Returns:
        a list of match rules
      • applyRules

        public void applyRules(Instance inst)
      • makeOutputInstance

        public Instance makeOutputInstance(Instance inputI)
        Make an output instance given an input one
        Parameters:
        inputI - the input instance to process
        Returns:
        the output instance with substrings replaced

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.