edu.stanford.nlp.trees
Class TreeLengthComparator
java.lang.Object
edu.stanford.nlp.trees.TreeLengthComparator
- All Implemented Interfaces:
- Comparator<Tree>
public class TreeLengthComparator
- extends Object
- implements Comparator<Tree>
A TreeLengthComparator
orders trees by their yield sentence
lengths.
- Author:
- Christopher Manning
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TreeLengthComparator
public TreeLengthComparator()
- Create a new
TreeLengthComparator
.
compare
public int compare(Tree t1,
Tree t2)
- Compare the two objects.
- Specified by:
compare
in interface Comparator<Tree>
Stanford NLP Group