mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-09 15:52:31 +03:00
Make words optional for get_doc
This commit is contained in:
parent
928db7e419
commit
8bf3bb5c44
|
@ -5,7 +5,7 @@ from ..tokens import Doc
|
||||||
from ..attrs import ORTH, POS, HEAD, DEP
|
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."""
|
"""Create Doc object from given vocab, words and annotations."""
|
||||||
tags = tags or [''] * len(words)
|
tags = tags or [''] * len(words)
|
||||||
heads = heads or [0] * len(words)
|
heads = heads or [0] * len(words)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user