Setting values to None results in an error
Using the setter in a UIMAType object with None
gives an error.
Somewhat fixable like this:
@simple_coref.setter
def simple_coref(self, ent: SimpleCorefEntity):
if ent is not None:
self.anno["SimpleCoref"] = ent.anno
A better way would probably be to write a generic setter function taking care of this, like
def _set_attr(self, uima_attribute_name, value):
...
and use this everywhere.