From 4e9727b474b73f8f78000e63588b47e3acb55f8d Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 16 Oct 2016 18:16:25 +0200 Subject: [PATCH] Use new words keyword argument in Doc. --- examples/training/train_tagger.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/training/train_tagger.py b/examples/training/train_tagger.py index f512c924e..6ec9cdea9 100644 --- a/examples/training/train_tagger.py +++ b/examples/training/train_tagger.py @@ -54,10 +54,9 @@ def main(output_dir=None): # The default_templates argument is where features are specified. See # spacy/tagger.pyx for the defaults. tagger = Tagger.blank(vocab, Tagger.default_templates()) - for i in range(5): for words, tags in DATA: - doc = Doc(vocab, orths_and_spaces=zip(words, [True] * len(words))) + doc = Doc(vocab, words=words) tagger.update(doc, tags) random.shuffle(DATA) tagger.model.end_training()