From 8bf3bb5c44e7383348463215188051ca8054dce7 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Wed, 11 Jan 2017 18:05:10 +0100 Subject: [PATCH] Make words optional for get_doc --- spacy/tests/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/tests/util.py b/spacy/tests/util.py index 54520fba6..417996c3f 100644 --- a/spacy/tests/util.py +++ b/spacy/tests/util.py @@ -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)