From 5cb812e0ab2f1cbddcc13b9cf442482112d28ced Mon Sep 17 00:00:00 2001 From: svlandeg Date: Sat, 20 Jun 2020 22:04:18 +0200 Subject: [PATCH] fix NER warn empty lookups (cf PR #5588) --- spacy/syntax/nn_parser.pyx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spacy/syntax/nn_parser.pyx b/spacy/syntax/nn_parser.pyx index 8218240f0..1dcb92016 100644 --- a/spacy/syntax/nn_parser.pyx +++ b/spacy/syntax/nn_parser.pyx @@ -608,6 +608,8 @@ cdef class Parser: def begin_training(self, get_examples, pipeline=None, sgd=None, **kwargs): self.cfg.update(kwargs) + if len(self.vocab.lookups.get_table("lexeme_norm", {})) == 0: + warnings.warn(Warnings.W033.format(model="parser or NER")) if not hasattr(get_examples, '__call__'): gold_tuples = get_examples get_examples = lambda: gold_tuples