mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
fix NER warn empty lookups (cf PR #5588)
This commit is contained in:
parent
c9242e9bf4
commit
5cb812e0ab
|
@ -608,6 +608,8 @@ cdef class Parser:
|
||||||
|
|
||||||
def begin_training(self, get_examples, pipeline=None, sgd=None, **kwargs):
|
def begin_training(self, get_examples, pipeline=None, sgd=None, **kwargs):
|
||||||
self.cfg.update(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__'):
|
if not hasattr(get_examples, '__call__'):
|
||||||
gold_tuples = get_examples
|
gold_tuples = get_examples
|
||||||
get_examples = lambda: gold_tuples
|
get_examples = lambda: gold_tuples
|
||||||
|
|
Loading…
Reference in New Issue
Block a user