mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
Fix Example usage in evaluate
This commit is contained in:
parent
42eb381ec6
commit
d8c70b415e
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue
Block a user