Restore tokenization timing in Language.evaluate (#9305)

Restore tokenization timing steps that were accidentally removed in #6765.
This commit is contained in:
Adriane Boyd 2021-09-27 20:44:14 +02:00 committed by GitHub
parent a361df00cd
commit e750c1760c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -1369,6 +1369,9 @@ class Language:
scorer = Scorer(**kwargs) scorer = Scorer(**kwargs)
# reset annotation in predicted docs and time tokenization # reset annotation in predicted docs and time tokenization
start_time = timer() start_time = timer()
# this is purely for timing
for eg in examples:
self.make_doc(eg.reference.text)
# apply all pipeline components # apply all pipeline components
for name, pipe in self.pipeline: for name, pipe in self.pipeline:
kwargs = component_cfg.get(name, {}) kwargs = component_cfg.get(name, {})