Fix formatting

This commit is contained in:
Adriane Boyd 2020-09-21 13:52:46 +02:00
parent bc02e86494
commit ce455f30ca
2 changed files with 12 additions and 2 deletions

View File

@ -34,8 +34,17 @@ def get_doc(
heads = [i + head for i, head in enumerate(heads)]
if ents is not None:
ents = [(vocab.strings[ent_type], start, end) for start, end, ent_type in ents]
return Doc(vocab, words=words, pos=pos, heads=heads, deps=deps, tags=tags,
ents=ents, lemmas=lemmas, morphs=morphs)
return Doc(
vocab,
words=words,
pos=pos,
heads=heads,
deps=deps,
tags=tags,
ents=ents,
lemmas=lemmas,
morphs=morphs,
)
def get_batch(batch_size):

View File

@ -1414,6 +1414,7 @@ cdef int set_children_from_heads(TokenC* tokens, int start, int end) except -1:
if tokens[i].head == 0:
tokens[tokens[i].l_edge].sent_start = 1
cdef int _set_lr_kids_and_edges(TokenC* tokens, int start, int end, int loop_count) except -1:
# May be called multiple times due to non-projectivity. See issues #3170
# and #4688.