mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-11 04:08:09 +03:00
* Add warning for models not found in parser
This commit is contained in:
parent
ef700401a6
commit
05b28ec9eb
|
@ -83,14 +83,14 @@ cdef class Parser:
|
|||
self.model = Model(self.moves.n_moves, templates, model_dir)
|
||||
|
||||
def __call__(self, Doc tokens):
|
||||
if self.cfg.get('beam_width', 1) < 1:
|
||||
if self.cfg.get('beam_width', 0) < 1:
|
||||
self._greedy_parse(tokens)
|
||||
else:
|
||||
self._beam_parse(tokens)
|
||||
|
||||
def train(self, Doc tokens, GoldParse gold):
|
||||
self.moves.preprocess_gold(gold)
|
||||
if self.cfg.beam_width < 1:
|
||||
if self.cfg.get('beam_width', 0) < 1:
|
||||
return self._greedy_train(tokens, gold)
|
||||
else:
|
||||
return self._beam_train(tokens, gold)
|
||||
|
|
Loading…
Reference in New Issue
Block a user