From 70da88a3a74e17b0c15fd9224c025a5c556625aa Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Thu, 14 Sep 2017 16:18:30 +0200 Subject: [PATCH] Update comment on Language.begin_training --- spacy/language.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/spacy/language.py b/spacy/language.py index 66b42ff94..e6a5304dd 100644 --- a/spacy/language.py +++ b/spacy/language.py @@ -347,15 +347,9 @@ class Language(object): """Allocate models, pre-process training data and acquire a trainer and optimizer. Used as a contextmanager. - gold_tuples (iterable): Gold-standard training data. + get_gold_tuples (function): Function returning gold data **cfg: Config parameters. - YIELDS (tuple): A trainer and an optimizer. - - EXAMPLE: - >>> with nlp.begin_training(gold, use_gpu=True) as (trainer, optimizer): - >>> for epoch in trainer.epochs(gold): - >>> for docs, golds in epoch: - >>> state = nlp.update(docs, golds, sgd=optimizer) + returns: An optimizer """ if self.parser: self.pipeline.append(NeuralLabeller(self.vocab))