Looks like the UIMA org.apache.uima.cas.impl.XmiCasSerializer.XmiDocSerializer.writeView(Sofa, Collection<TOP>) method only creates the view element in the XMI if there are annotations pointing to that Sofa (i.e. membersString.length() > 0):
Traceback (most recent call last):
File "./cas_mult_views.py", line 12, in <module>
cas = load_cas_from_xmi(xmi_file, typesystem=type_system)
File "/usr/local/lib/python3.6/site-packages/cassis/xmi.py", line 40, in load_cas_from_xmi
return deserializer.deserialize(source, typesystem=typesystem)
File "/usr/local/lib/python3.6/site-packages/cassis/xmi.py", line 131, in deserialize
raise RuntimeError("Number of views and sofas is not equal!")
RuntimeError: Number of views and sofas is not equal!
Expected behavior
Create an empty view if it is missing in the XMI
Describe the bug
Looks like the UIMA
org.apache.uima.cas.impl.XmiCasSerializer.XmiDocSerializer.writeView(Sofa, Collection<TOP>)
method only creates theview
element in the XMI if there are annotations pointing to that Sofa (i.e.membersString.length() > 0
):To Reproduce Use CAS and type system from here.
I get this error:
Expected behavior Create an empty view if it is missing in the XMI