mirror of https://github.com/explosion/spaCy.git
fix nn parser sample construction (#4524)
This commit is contained in:
parent
cfffdba7b1
commit
99e309bb19
|
@ -607,7 +607,7 @@ cdef class Parser:
|
||||||
ids, words, tags, heads, deps, ents = annots
|
ids, words, tags, heads, deps, ents = annots
|
||||||
doc_sample.append(Doc(self.vocab, words=words))
|
doc_sample.append(Doc(self.vocab, words=words))
|
||||||
gold_sample.append(GoldParse(doc_sample[-1], words=words, tags=tags,
|
gold_sample.append(GoldParse(doc_sample[-1], words=words, tags=tags,
|
||||||
heads=heads, deps=deps, ents=ents))
|
heads=heads, deps=deps, entities=ents))
|
||||||
self.model.begin_training(doc_sample, gold_sample)
|
self.model.begin_training(doc_sample, gold_sample)
|
||||||
if pipeline is not None:
|
if pipeline is not None:
|
||||||
self.init_multitask_objectives(get_gold_tuples, pipeline, sgd=sgd, **cfg)
|
self.init_multitask_objectives(get_gold_tuples, pipeline, sgd=sgd, **cfg)
|
||||||
|
|
Loading…
Reference in New Issue