From d8c70b415e83ba0753d94551a785fe5f1bc695fa Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sat, 27 Jun 2020 21:15:25 +0200 Subject: [PATCH] Fix Example usage in evaluate --- spacy/cli/evaluate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacy/cli/evaluate.py b/spacy/cli/evaluate.py index fcc7fbf9b..2ff9e3066 100644 --- a/spacy/cli/evaluate.py +++ b/spacy/cli/evaluate.py @@ -72,7 +72,7 @@ def evaluate( begin = timer() scorer = nlp.evaluate(dev_dataset, verbose=False) end = timer() - nwords = sum(len(ex.doc) for ex in dev_dataset) + nwords = sum(len(ex.predicted) for ex in dev_dataset) results = { "Time": f"{end - begin:.2f} s", "Words": nwords, @@ -95,7 +95,7 @@ def evaluate( msg.table(results, title="Results") if displacy_path: - docs = [ex.doc for ex in dev_dataset] + docs = [ex.predicted for ex in dev_dataset] render_deps = "parser" in nlp.meta.get("pipeline", []) render_ents = "ner" in nlp.meta.get("pipeline", []) render_parses(