mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-13 05:07:03 +03:00
Fix Example usage in evaluate
This commit is contained in:
parent
42eb381ec6
commit
d8c70b415e
|
@ -72,7 +72,7 @@ def evaluate(
|
||||||
begin = timer()
|
begin = timer()
|
||||||
scorer = nlp.evaluate(dev_dataset, verbose=False)
|
scorer = nlp.evaluate(dev_dataset, verbose=False)
|
||||||
end = timer()
|
end = timer()
|
||||||
nwords = sum(len(ex.doc) for ex in dev_dataset)
|
nwords = sum(len(ex.predicted) for ex in dev_dataset)
|
||||||
results = {
|
results = {
|
||||||
"Time": f"{end - begin:.2f} s",
|
"Time": f"{end - begin:.2f} s",
|
||||||
"Words": nwords,
|
"Words": nwords,
|
||||||
|
@ -95,7 +95,7 @@ def evaluate(
|
||||||
msg.table(results, title="Results")
|
msg.table(results, title="Results")
|
||||||
|
|
||||||
if displacy_path:
|
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_deps = "parser" in nlp.meta.get("pipeline", [])
|
||||||
render_ents = "ner" in nlp.meta.get("pipeline", [])
|
render_ents = "ner" in nlp.meta.get("pipeline", [])
|
||||||
render_parses(
|
render_parses(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user