mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Fix add_attrs for cluster
This commit is contained in:
parent
5ede7cec9b
commit
41d0f1665a
|
@ -76,6 +76,8 @@ cdef class Lexeme:
|
||||||
for attr, value in attrs.items():
|
for attr, value in attrs.items():
|
||||||
if attr == PROB:
|
if attr == PROB:
|
||||||
self.c.prob = value
|
self.c.prob = value
|
||||||
|
elif attr == CLUSTER:
|
||||||
|
self.c.cluster = int(value)
|
||||||
elif isinstance(value, int) or isinstance(value, long):
|
elif isinstance(value, int) or isinstance(value, long):
|
||||||
Lexeme.set_struct_attr(self.c, attr, value)
|
Lexeme.set_struct_attr(self.c, attr, value)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user