edu.stanford.nlp.classify
Class NegativeFilter

java.lang.Object
  |
  +--edu.stanford.nlp.classify.NegativeFilter
All Implemented Interfaces:
Filter

public class NegativeFilter
extends Object
implements Filter

This filter does some very primitive negative scoping, using the same method as the Almaden code. That is, it looks for and deletes anything between a "negative word" and the end of a sentence.


Constructor Summary
NegativeFilter()
          Constructor
 
Method Summary
 String filter(String s)
          The filter method takes an unfiltered String s and returns a filtered String.
 boolean isNegative(String s)
          Checks whether a token is "negative"
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NegativeFilter

public NegativeFilter()
Constructor

Method Detail

filter

public String filter(String s)
The filter method takes an unfiltered String s and returns a filtered String.

Specified by:
filter in interface Filter

isNegative

public boolean isNegative(String s)
Checks whether a token is "negative"



Stanford NLP Group