mirror of https://github.com/explosion/spaCy.git
Fix formatting
This commit is contained in:
parent
bc02e86494
commit
ce455f30ca
|
@ -34,8 +34,17 @@ def get_doc(
|
||||||
heads = [i + head for i, head in enumerate(heads)]
|
heads = [i + head for i, head in enumerate(heads)]
|
||||||
if ents is not None:
|
if ents is not None:
|
||||||
ents = [(vocab.strings[ent_type], start, end) for start, end, ent_type in ents]
|
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,
|
return Doc(
|
||||||
ents=ents, lemmas=lemmas, morphs=morphs)
|
vocab,
|
||||||
|
words=words,
|
||||||
|
pos=pos,
|
||||||
|
heads=heads,
|
||||||
|
deps=deps,
|
||||||
|
tags=tags,
|
||||||
|
ents=ents,
|
||||||
|
lemmas=lemmas,
|
||||||
|
morphs=morphs,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def get_batch(batch_size):
|
def get_batch(batch_size):
|
||||||
|
|
|
@ -1414,6 +1414,7 @@ cdef int set_children_from_heads(TokenC* tokens, int start, int end) except -1:
|
||||||
if tokens[i].head == 0:
|
if tokens[i].head == 0:
|
||||||
tokens[tokens[i].l_edge].sent_start = 1
|
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:
|
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
|
# May be called multiple times due to non-projectivity. See issues #3170
|
||||||
# and #4688.
|
# and #4688.
|
||||||
|
|
Loading…
Reference in New Issue