diff --git a/website/docs/usage/training.jade b/website/docs/usage/training.jade index 98afef36b..6963730ab 100644 --- a/website/docs/usage/training.jade +++ b/website/docs/usage/training.jade @@ -13,14 +13,17 @@ p +code. from spacy.vocab import Vocab - from spacy.pipeline import Tagger + from spacy.tagger import Tagger from spacy.tokens import Doc + from spacy.gold import GoldParse + vocab = Vocab(tag_map={'N': {'pos': 'NOUN'}, 'V': {'pos': 'VERB'}}) tagger = Tagger(vocab) doc = Doc(vocab, words=['I', 'like', 'stuff']) - tagger.update(doc, ['N', 'V', 'N']) + gold = GoldParse(doc, tags=['N', 'V', 'N']) + tagger.update(doc, gold) tagger.model.end_training()