Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 208dd33

Browse files
committedFeb 16, 2024·
Add some doc to EvaluateTreebank
1 parent 3499d27 commit 208dd33

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎src/edu/stanford/nlp/parser/metrics/EvaluateTreebank.java

+7
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,12 @@ public void summarize(PrintWriter pwErr, TreebankLanguagePack tlp) {
648648
}
649649
}
650650

651+
/**
652+
* Wrapper for a dataset which was already parsed, such as that passed in to EvaluateExternalParser.
653+
* <br>
654+
* Using this and the EvaluationDataset in general allows for scoring already known results and
655+
* the results of a parser on raw text with the same codepaths
656+
*/
651657
public static class PreparsedEvaluationDataset implements EvaluationDataset {
652658
List<Pair<ParserQuery, Tree>> testTreebank;
653659

@@ -729,6 +735,7 @@ public double testOnTreebank(EvaluationDataset testTreebank) {
729735
pwStats = null;
730736
}
731737

738+
System.err.println(testTreebank.getClass());
732739
testTreebank.processDataset(pwEvalErr, pwOut, pwFileOut, pwStats, treePrint,
733740
(pq, goldTree) -> processResults(pq, goldTree, pwEvalErr, pwOut, pwFileOut, pwStats, treePrint));
734741

0 commit comments

Comments
 (0)
Please sign in to comment.