mirror of
https://github.com/explosion/spaCy.git
synced 2025-10-02 09:56:39 +03:00
Fix
This commit is contained in:
parent
c68be0ceec
commit
6f59ff05f2
|
@ -124,7 +124,6 @@ cpdef deprojectivize(Doc doc):
|
||||||
labels.append(doc.vocab.strings[doc.c[i].dep])
|
labels.append(doc.vocab.strings[doc.c[i].dep])
|
||||||
texts = [w.text for w in doc]
|
texts = [w.text for w in doc]
|
||||||
indices = list(range(len(doc)))
|
indices = list(range(len(doc)))
|
||||||
labels = [w.dep_ for w in token.doc]
|
|
||||||
with (LOG_DIR / f"{file_num}.json").open("w") as file_:
|
with (LOG_DIR / f"{file_num}.json").open("w") as file_:
|
||||||
file_.write(json.dumps(list(zip(indices, texts, heads, labels)), indent=2))
|
file_.write(json.dumps(list(zip(indices, texts, heads, labels)), indent=2))
|
||||||
file_num += 1
|
file_num += 1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user