Class SingleLabelFilterBase

    • Constructor Detail

      • SingleLabelFilterBase

        public SingleLabelFilterBase()
    • Method Detail

      • filter

        public void filter​(PreprocessingContext context,
                           boolean[] acceptedStems,
                           boolean[] acceptedPhrases)
        Description copied from interface: LabelFilter
        Called to perform label filtering.
        Specified by:
        filter in interface LabelFilter
        Parameters:
        context - contains words and phrases to be filtered
        acceptedStems - the filter should set to false those elements that correspond to the stems to be filtered out
        acceptedPhrases - the filter should set to false those elements that correspond to the phrases to be filtered out
      • acceptWord

        public abstract boolean acceptWord​(PreprocessingContext context,
                                           int wordIndex)
        Should return true if the word located at wordIndex is to be accepted, false otherwise.
        Parameters:
        context - provides access to all information about the word
        wordIndex - index of the word for which decision is to be made
      • acceptPhrase

        public abstract boolean acceptPhrase​(PreprocessingContext context,
                                             int phraseIndex)
        Should return true if the phrase located at phraseIndex is to be accepted, false otherwise.
        Parameters:
        context - provides access to all information about the phrase
        phraseIndex - index of the phrase for which decision is to be made