Use new words keyword argument in Doc.

This commit is contained in:
Matthew Honnibal 2016-10-16 18:16:25 +02:00
parent 06322ba99d
commit 4e9727b474

View File

@ -54,10 +54,9 @@ def main(output_dir=None):
# The default_templates argument is where features are specified. See # The default_templates argument is where features are specified. See
# spacy/tagger.pyx for the defaults. # spacy/tagger.pyx for the defaults.
tagger = Tagger.blank(vocab, Tagger.default_templates()) tagger = Tagger.blank(vocab, Tagger.default_templates())
for i in range(5): for i in range(5):
for words, tags in DATA: 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) tagger.update(doc, tags)
random.shuffle(DATA) random.shuffle(DATA)
tagger.model.end_training() tagger.model.end_training()