Fix add_attrs for cluster

This commit is contained in:
Explosion Bot 2017-10-30 16:07:50 +01:00
parent 5ede7cec9b
commit 41d0f1665a

View File

@ -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: