edu.stanford.nlp.trees
Class TreeLengthComparator

java.lang.Object
  extended by edu.stanford.nlp.trees.TreeLengthComparator
All Implemented Interfaces:
java.util.Comparator<Tree>

public class TreeLengthComparator
extends java.lang.Object
implements java.util.Comparator<Tree>

A TreeLengthComparator orders trees by their yield sentence lengths.

Author:
Christopher Manning

Constructor Summary
TreeLengthComparator()
          Create a new TreeLengthComparator.
 
Method Summary
 int compare(Tree t1, Tree t2)
          Compare the two objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

TreeLengthComparator

public TreeLengthComparator()
Create a new TreeLengthComparator.

Method Detail

compare

public int compare(Tree t1,
                   Tree t2)
Compare the two objects.

Specified by:
compare in interface java.util.Comparator<Tree>


Stanford NLP Group