mirror of https://github.com/explosion/spaCy.git
Disable labeller if not parsing
This commit is contained in:
parent
c52fde40f4
commit
8f8f90b46b
|
@ -303,6 +303,7 @@ class Language(object):
|
||||||
>>> for docs, golds in epoch:
|
>>> for docs, golds in epoch:
|
||||||
>>> state = nlp.update(docs, golds, sgd=optimizer)
|
>>> state = nlp.update(docs, golds, sgd=optimizer)
|
||||||
"""
|
"""
|
||||||
|
if self.parser:
|
||||||
self.pipeline.append(NeuralLabeller(self.vocab))
|
self.pipeline.append(NeuralLabeller(self.vocab))
|
||||||
# Populate vocab
|
# Populate vocab
|
||||||
for _, annots_brackets in get_gold_tuples():
|
for _, annots_brackets in get_gold_tuples():
|
||||||
|
|
Loading…
Reference in New Issue