Class GenitiveLabelFilter

All Implemented Interfaces:
AcceptingVisitor

public class GenitiveLabelFilter extends SingleLabelFilterBase
Removes labels that end in words in the Saxon Genitive form, for example Threatening the Country's.
  • Constructor Details

    • GenitiveLabelFilter

      public GenitiveLabelFilter()
  • Method Details

    • acceptPhrase

      public boolean acceptPhrase(PreprocessingContext context, int phraseIndex)
      Description copied from class: SingleLabelFilterBase
      Should return true if the phrase located at phraseIndex is to be accepted, false otherwise.
      Specified by:
      acceptPhrase in class SingleLabelFilterBase
      Parameters:
      context - provides access to all information about the phrase
      phraseIndex - index of the phrase for which decision is to be made
    • acceptWord

      public boolean acceptWord(PreprocessingContext context, int wordIndex)
      Description copied from class: SingleLabelFilterBase
      Should return true if the word located at wordIndex is to be accepted, false otherwise.
      Specified by:
      acceptWord in class SingleLabelFilterBase
      Parameters:
      context - provides access to all information about the word
      wordIndex - index of the word for which decision is to be made