edu.stanford.nlp.trees
Class LengthTreeFilter

java.lang.Object
  extended by edu.stanford.nlp.trees.LengthTreeFilter
All Implemented Interfaces:
Filter<Tree>, java.io.Serializable

public class LengthTreeFilter
extends java.lang.Object
implements Filter<Tree>

Only accept trees that are short enough (less than or equal to length). It's not always about length, but in this case it is.

Author:
John Bauer
See Also:
Serialized Form

Constructor Summary
LengthTreeFilter(int length)
           
 
Method Summary
 boolean accept(Tree tree)
          Checks if the given object passes the filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LengthTreeFilter

public LengthTreeFilter(int length)
Method Detail

accept

public boolean accept(Tree tree)
Description copied from interface: Filter
Checks if the given object passes the filter.

Specified by:
accept in interface Filter<Tree>
Parameters:
tree - an object to test
Returns:
Whether the object should be accepted (for some processing)


Stanford NLP Group