Class AbstractTweetContentFilter

  • All Implemented Interfaces:
    Serializable, weka.core.CapabilitiesHandler, weka.core.CapabilitiesIgnorer, weka.core.CommandlineRunnable, weka.core.OptionHandler, weka.core.RevisionHandler
    Direct Known Subclasses:
    TwitterEmoticonScore, TwitterNLPPos

    public abstract class AbstractTweetContentFilter
    extends weka.filters.SimpleBatchFilter
    Ancestor for filters that parse tweet content.
    Version:
    $Revision$
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String ATT_NAME  
      protected String m_AttributeName
      the name of the string attribute to process.
      • Fields inherited from class weka.filters.Filter

        m_Debug, m_DoNotCheckCapabilities, m_FirstBatchDone, m_InputRelAtts, m_InputStringAtts, m_NewBatch, m_OutputRelAtts, m_OutputStringAtts
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean allowAccessToFullInputFormat()
      Returns whether to allow the determineOutputFormat(Instances) method access to the full dataset rather than just the header.
      String attributeNameTipText()
      Returns the tip text for this property.
      protected void checkInputFormat​(weka.core.Instances inputFormat)
      Checks the input format.
      String getAttributeName()
      Returns the name of the string attribute to process.
      weka.core.Capabilities getCapabilities()
      Returns the Capabilities of this filter.
      protected String getDefaultAttributeName()
      Returns the default attribute name.
      String[] getOptions()
      Gets the current option settings for the OptionHandler.
      Enumeration listOptions()
      Returns an enumeration describing the available options.
      void setAttributeName​(String value)
      Sets the name of the string attribute to process.
      void setOptions​(String[] options)
      Sets the OptionHandler's options using the given list.
      • Methods inherited from class weka.filters.SimpleBatchFilter

        batchFinished, hasImmediateOutputFormat, input, input
      • Methods inherited from class weka.filters.SimpleFilter

        determineOutputFormat, globalInfo, process, reset, setInputFormat
      • Methods inherited from class weka.filters.Filter

        batchFilterFile, bufferInput, copyValues, copyValues, debugTipText, doNotCheckCapabilitiesTipText, filterFile, flushInput, getCapabilities, getCopyOfInputFormat, getDebug, getDoNotCheckCapabilities, getInputFormat, getOutputFormat, getRevision, initInputLocators, initOutputLocators, inputFormatPeek, isFirstBatchDone, isNewBatch, isOutputFormatDefined, main, makeCopies, makeCopy, mayRemoveInstanceAfterFirstBatchDone, numPendingOutput, output, outputFormatPeek, outputPeek, postExecution, preExecution, push, push, resetQueue, run, runFilter, setDebug, setDoNotCheckCapabilities, setOutputFormat, testInputFormat, toString, useFilter, wekaStaticWrapper
    • Field Detail

      • m_AttributeName

        protected String m_AttributeName
        the name of the string attribute to process.
    • Constructor Detail

      • AbstractTweetContentFilter

        public AbstractTweetContentFilter()
    • Method Detail

      • listOptions

        public Enumeration listOptions()
        Returns an enumeration describing the available options.
        Specified by:
        listOptions in interface weka.core.OptionHandler
        Overrides:
        listOptions in class weka.filters.Filter
        Returns:
        an enumeration of all the available options.
      • setOptions

        public void setOptions​(String[] options)
                        throws Exception
        Sets the OptionHandler's options using the given list. All options will be set (or reset) during this call (i.e. incremental setting of options is not possible).
        Specified by:
        setOptions in interface weka.core.OptionHandler
        Overrides:
        setOptions in class weka.filters.Filter
        Parameters:
        options - the list of options as an array of strings
        Throws:
        Exception - if an option is not supported
      • getOptions

        public String[] getOptions()
        Gets the current option settings for the OptionHandler.
        Specified by:
        getOptions in interface weka.core.OptionHandler
        Overrides:
        getOptions in class weka.filters.Filter
        Returns:
        the list of current option settings as an array of strings
      • getDefaultAttributeName

        protected String getDefaultAttributeName()
        Returns the default attribute name.
        Returns:
        the default
      • setAttributeName

        public void setAttributeName​(String value)
        Sets the name of the string attribute to process.
        Parameters:
        value - the name
      • getAttributeName

        public String getAttributeName()
        Returns the name of the string attribute to process.
        Returns:
        the name
      • attributeNameTipText

        public String attributeNameTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • allowAccessToFullInputFormat

        public boolean allowAccessToFullInputFormat()
        Returns whether to allow the determineOutputFormat(Instances) method access to the full dataset rather than just the header.
        Overrides:
        allowAccessToFullInputFormat in class weka.filters.SimpleBatchFilter
        Returns:
        whether determineOutputFormat has access to the full input dataset
      • getCapabilities

        public weka.core.Capabilities getCapabilities()
        Returns the Capabilities of this filter. Derived filters have to override this method to enable capabilities.
        Specified by:
        getCapabilities in interface weka.core.CapabilitiesHandler
        Overrides:
        getCapabilities in class weka.filters.Filter
        Returns:
        the capabilities of this object
        See Also:
        Capabilities
      • checkInputFormat

        protected void checkInputFormat​(weka.core.Instances inputFormat)
                                 throws Exception
        Checks the input format.
        Parameters:
        inputFormat - the input format to check
        Throws:
        Exception - in case the input format is invalid