mirror of
https://github.com/explosion/spaCy.git
synced 2025-05-29 02:03:18 +03:00
Disable labeller if not parsing
This commit is contained in:
parent
c52fde40f4
commit
8f8f90b46b
|
@ -303,7 +303,8 @@ 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)
|
||||||
"""
|
"""
|
||||||
self.pipeline.append(NeuralLabeller(self.vocab))
|
if self.parser:
|
||||||
|
self.pipeline.append(NeuralLabeller(self.vocab))
|
||||||
# Populate vocab
|
# Populate vocab
|
||||||
for _, annots_brackets in get_gold_tuples():
|
for _, annots_brackets in get_gold_tuples():
|
||||||
for annots, _ in annots_brackets:
|
for annots, _ in annots_brackets:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user