edu.stanford.nlp.trees
Class DependencyScoring

java.lang.Object
  extended by edu.stanford.nlp.trees.DependencyScoring

public class DependencyScoring
extends Object

Scoring of typed dependencies

Author:
danielcer

Nested Class Summary
 class DependencyScoring.Score
           
 
Field Summary
 List<Set<TypedDependency>> goldDeps
           
 List<Set<TypedDependency>> goldDepsUnlabeled
           
 
Constructor Summary
DependencyScoring(List<Collection<TypedDependency>> goldDeps)
           
DependencyScoring(String filename)
           
 
Method Summary
static List<Collection<TypedDependency>> convertStringEquality(List<Collection<TypedDependency>> deps)
           
static void main(String[] args)
           
static DependencyScoring newInstanceStringEquality(List<Collection<TypedDependency>> goldDeps)
           
protected static String normalizeNumbers(String token)
          Normalize all number tokens to <num> in order to allow for proper scoring of MSTParser productions.
protected static List<Collection<TypedDependency>> readDeps(String filename)
          Read in typed dependencies.
 DependencyScoring.Score score(List<Collection<TypedDependency>> system)
          Score system typed dependencies
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

goldDeps

public final List<Set<TypedDependency>> goldDeps

goldDepsUnlabeled

public final List<Set<TypedDependency>> goldDepsUnlabeled
Constructor Detail

DependencyScoring

public DependencyScoring(List<Collection<TypedDependency>> goldDeps)

DependencyScoring

public DependencyScoring(String filename)
                  throws IOException
Throws:
IOException
Method Detail

newInstanceStringEquality

public static DependencyScoring newInstanceStringEquality(List<Collection<TypedDependency>> goldDeps)

convertStringEquality

public static List<Collection<TypedDependency>> convertStringEquality(List<Collection<TypedDependency>> deps)

normalizeNumbers

protected static String normalizeNumbers(String token)
Normalize all number tokens to <num> in order to allow for proper scoring of MSTParser productions.


readDeps

protected static List<Collection<TypedDependency>> readDeps(String filename)
                                                     throws IOException
Read in typed dependencies. Warning created typed dependencies are not backed by any sort of a tree structure.

Parameters:
filename -
Returns:
Throws:
IOException

score

public DependencyScoring.Score score(List<Collection<TypedDependency>> system)
Score system typed dependencies

Parameters:
system -
Returns:
a triple consisting of (labeled attachment, unlabeled attachment, label accuracy)

main

public static void main(String[] args)
                 throws IOException
Throws:
IOException


Stanford NLP Group