mirror of https://github.com/explosion/spaCy.git
Support TAG attribute in doc.from_array
This commit is contained in:
parent
271997a146
commit
44e2b0100d
|
@ -585,6 +585,9 @@ cdef class Doc:
|
||||||
elif attr_id == POS:
|
elif attr_id == POS:
|
||||||
for i in range(length):
|
for i in range(length):
|
||||||
tokens[i].pos = <univ_pos_t>values[i]
|
tokens[i].pos = <univ_pos_t>values[i]
|
||||||
|
elif attr_id == TAG:
|
||||||
|
for i in range(length):
|
||||||
|
tokens[i].tag = <univ_pos_t>values[i]
|
||||||
elif attr_id == DEP:
|
elif attr_id == DEP:
|
||||||
for i in range(length):
|
for i in range(length):
|
||||||
tokens[i].dep = values[i]
|
tokens[i].dep = values[i]
|
||||||
|
|
Loading…
Reference in New Issue