From e750c1760c5ad4324e606c8dcc528d1b735d3941 Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Mon, 27 Sep 2021 20:44:14 +0200 Subject: [PATCH] Restore tokenization timing in Language.evaluate (#9305) Restore tokenization timing steps that were accidentally removed in #6765. --- spacy/language.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spacy/language.py b/spacy/language.py index 08fb63d4c..6abbc6f56 100644 --- a/spacy/language.py +++ b/spacy/language.py @@ -1369,6 +1369,9 @@ class Language: scorer = Scorer(**kwargs) # reset annotation in predicted docs and time tokenization start_time = timer() + # this is purely for timing + for eg in examples: + self.make_doc(eg.reference.text) # apply all pipeline components for name, pipe in self.pipeline: kwargs = component_cfg.get(name, {})