edu.stanford.nlp.parser.metrics
Class TreeSpanScoring

java.lang.Object
  extended by edu.stanford.nlp.parser.metrics.TreeSpanScoring

public class TreeSpanScoring
extends java.lang.Object

Provides a method for deciding how similar two trees are.

Author:
John Bauer

Method Summary
static int countSpanErrors(TreebankLanguagePack tlp, Tree goldTree, Tree guessTree)
          Counts how many spans are present in goldTree, including preterminals, but not present in guessTree, along with how many spans are present in guessTree and not goldTree.
static java.util.Set<Constituent> simplifyConstituents(TreebankLanguagePack tlp, java.util.Set<Constituent> constituents)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

countSpanErrors

public static int countSpanErrors(TreebankLanguagePack tlp,
                                  Tree goldTree,
                                  Tree guessTree)
Counts how many spans are present in goldTree, including preterminals, but not present in guessTree, along with how many spans are present in guessTree and not goldTree. Each one counts as an error, meaning that something like a mislabeled span or preterminal counts as two errors.
Span labels are compared using the basicCategory() function from the passed in TreebankLanguagePack.


simplifyConstituents

public static java.util.Set<Constituent> simplifyConstituents(TreebankLanguagePack tlp,
                                                              java.util.Set<Constituent> constituents)


Stanford NLP Group