mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 18:26:30 +03:00
Pass smaller doc sample into model initialize
This commit is contained in:
parent
3b5cfec1fc
commit
df87c32a40
|
@ -624,11 +624,12 @@ cdef class Parser:
|
||||||
sgd = self.create_optimizer()
|
sgd = self.create_optimizer()
|
||||||
doc_sample = []
|
doc_sample = []
|
||||||
gold_sample = []
|
gold_sample = []
|
||||||
for example in islice(get_examples(), 1000):
|
for example in islice(get_examples(), 10):
|
||||||
parses = example.get_gold_parses(merge=False, vocab=self.vocab)
|
parses = example.get_gold_parses(merge=False, vocab=self.vocab)
|
||||||
for doc, gold in parses:
|
for doc, gold in parses:
|
||||||
doc_sample.append(doc)
|
if len(doc):
|
||||||
gold_sample.append(gold)
|
doc_sample.append(doc)
|
||||||
|
gold_sample.append(gold)
|
||||||
for name, component in pipeline:
|
for name, component in pipeline:
|
||||||
if component is self:
|
if component is self:
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue
Block a user