Class BinnableInstances.StringAttributeGroupExtractor

    • Field Detail

      • m_Index

        protected int m_Index
        the attribute index.
      • m_RegExp

        protected String m_RegExp
        the regular expression.
      • m_Group

        protected String m_Group
        the group to extract.
    • Constructor Detail

      • StringAttributeGroupExtractor

        public StringAttributeGroupExtractor​(int index,
                                             String regExp,
                                             String group)
        Initializes the extractor.
        Parameters:
        index - the index (0-based) of the string attribute
        regExp - the regular expression to apply to the strings
        group - the regexp group to extract as group
    • Method Detail

      • extractGroup

        public String extractGroup​(Binnable<weka.core.Instance> item)
        Extracts the group from the binnable object.
        Specified by:
        extractGroup in interface Grouping.GroupExtractor<weka.core.Instance>
        Parameters:
        item - the item to extract the group from
        Returns:
        the extracted group