dkpro / dkpro-cassis

UIMA CAS processing library written in Python
https://pypi.org/project/dkpro-cassis/
Apache License 2.0
84 stars 22 forks source link

Parsing an array that was serialized using `multipleReferencesAllowed=true` fails #209

Closed reckart closed 2 years ago

reckart commented 2 years ago

Describe the bug Parsing an array that was serialized using multipleReferencesAllowed=true fails with.

To Reproduce Try loading these:

<?xml version="1.0" encoding="UTF-8"?>
<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
    <types>
        <typeDescription>
            <name>test.type</name>
            <description/>
            <supertypeName>uima.tcas.Annotation</supertypeName>
            <features>
                <featureDescription>
                    <name>target</name>
                    <description/>
                    <rangeTypeName>uima.cas.StringArray</rangeTypeName>
                    <elementType>uima.cas.String</elementType>
                    <multipleReferencesAllowed>true</multipleReferencesAllowed>
                </featureDescription>
            </features>
        </typeDescription>
    </types>
</typeSystemDescription>
<?xml version="1.0" ?>
<xmi:XMI xmi:version="2.0" xmlns:cas="http:///uima/cas.ecore"
         xmlns:tcas="http:///uima/tcas.ecore"
         xmlns:xmi="http://www.omg.org/XMI"
         xmlns:test="http:///test.ecore">

    <cas:NULL xmi:id="0"/>

    <tcas:DocumentAnnotation xmi:id="1" sofa="1" begin="0" end="47" language="x-unspecified"/>

    <test:type xmi:id="2" sofa="1" target="3"/>

    <cas:StringArray xmi:id="3">
        <elements>LNC</elements>
        <elements>MTH</elements>
        <elements>SNOMEDCT_US</elements>
    </cas:StringArray>

    <cas:Sofa xmi:id="1" sofaNum="1" sofaID="_InitialView" mimeType="text/plain"
              sofaString="Joe waited for the train . The train was late ."/>
    <cas:View members="1 2" sofa="1"/>
</xmi:XMI>

Expected behavior Should just work.

Please complete the following information: