Make words optional for get_doc

This commit is contained in:
Ines Montani 2017-01-11 18:05:10 +01:00
parent 928db7e419
commit 8bf3bb5c44
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ from ..tokens import Doc
from ..attrs import ORTH, POS, HEAD, DEP
def get_doc(vocab, words, tags=None, heads=None, deps=None):
def get_doc(vocab, words=[], tags=None, heads=None, deps=None):
"""Create Doc object from given vocab, words and annotations."""
tags = tags or [''] * len(words)
heads = heads or [0] * len(words)