Closed aarongiera closed 2 years ago
Thanks, that's indeed a case no yet covered by the UIMA/cassis XMI test suite. Looking into it!
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmlns:noNamespace="http:///uima/noNamespace.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:cas="http:///uima/cas.ecore" xmi:version="2.0">
<cas:NULL xmi:id="0"/>
<cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView"/>
<tcas:Annotation xmi:id="2" sofa="1" begin="0" end="0"/>
<tcas:Annotation xmi:id="3" sofa="1" begin="0" end="0"/>
<cas:View sofa="1" members="6 7"/>
<!-- We support this case when a list is added directly to an index or when "multipleReferencesAllows=true" -->
<cas:NonEmptyFSList xmi:id="6" tail="5" head="3"/>
<cas:NonEmptyFSList xmi:id="5" tail="4" head="2"/>
<cas:EmptyFSList xmi:id="4"/>
<!-- This case when "multipleReferencesAllows=false" and the list is not indexed is currently not supported -->
<noNamespace:FsListHolder xmi:id="7" fsList="3 2"/>
</xmi:XMI>
<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:noNamespace="http:///uima/noNamespace.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:cas="http:///uima/cas.ecore" xmi:version="2.0">
<cas:NULL xmi:id="0"/>
<cas:NonEmptyFSList xmi:id="6" tail="5" head="3"/>
<noNamespace:FsListHolder xmi:id="7" fsList="3 2"/>
<cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView"/>
<cas:NonEmptyFSList xmi:id="5" tail="4" head="2"/>
<cas:EmptyFSList xmi:id="4"/>
<tcas:Annotation xmi:id="2" sofa="1" begin="0" end="0"/>
<tcas:Annotation xmi:id="3" sofa="1" begin="0" end="0"/>
<cas:View sofa="1" members="6 7"/>
</xmi:XMI>
I think the suggested fix looks ok.
@jcklie WDYT?
Looks good to me
Ok, so the proposed fix is not a fix because it stores the "tail" feature of the list as a python list. But what should be done is to decode the array of identifiers into a series of linked up NonEmptyFSList and EmptyFSList instances - at least for the time being.
It would be way more convenient if an FSList (IntegerList, etc. etc) could be handled as a python list/array in python, but I'm not exactly sure how to implement this (yet).
Describe the bug I encountered an error while loading a ctakes xmi file.
To Reproduce I've attached the ctakes TypeSystem.xml file here. Loading this does produce some warnings due to duplicate features, but I think this is normal. I've also attached the xmi. It's just the default clinical pipeline ran on the example note in the ctakes install guide. I think this is the offending xml element:
Here's the code:
Error message I provided some variables at the break point for debugging.
Potential Solution This get's rid of the error, but I'm not sure if this the proper way to fix it. I'm not very familiar with uima yet.