mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 09:26:27 +03:00
Use new words keyword argument in Doc.
This commit is contained in:
parent
06322ba99d
commit
4e9727b474
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user