Pass smaller doc sample into model initialize
@@ -624,9 +624,10 @@ cdef class Parser:
sgd = self.create_optimizer()
doc_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)
for doc, gold in parses:
+ if len(doc):
doc_sample.append(doc)
gold_sample.append(gold)
for name, component in pipeline:
