mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 01:16: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():
|
||||
if attr == PROB:
|
||||
self.c.prob = value
|
||||
elif attr == CLUSTER:
|
||||
self.c.cluster = int(value)
|
||||
elif isinstance(value, int) or isinstance(value, long):
|
||||
Lexeme.set_struct_attr(self.c, attr, value)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user