Hello!

I tried to use in my Type System the subset of the String that specifies a restricted set of allowed values (cf. UIMA SDK 23-295). I assumed that UIMA will check then if the assigned value is correct (is in the restricted list). It was not the case because I could assign other values as well.

Please, see the extracts from the Type System and the code in the Annotator (see below). Is there something wrong?

Type System:

<typeDescription>
<name>de.julielab.jules.types.PennPOSTag</name>
<description></description>
<supertypeName>de.julielab.jules.types.POSTag</supertypeName>
<features>
<featureDescription>
<name>value</name>
<description></description>
<rangeTypeName>de.julielab.jules.types.PennPOS</rangeTypeName>
</featureDescription>
</features>
</typeDescription>
<typeDescription>

<typeDescription>
<name>de.julielab.jules.types.PennPOS</name>
<description></description>
<supertypeName>uima.cas.String</supertypeName>
<allowedValues>
<value>
<string>CC</string>
<description>Coordinating conjunction</description>
</value>
<value>
<string>CD</string>
<description>Cardinal number</description>
</value>
<value>
<string>DT</string>
<description>Determiner</description>
</value>
<value>
</allowedValues>
</typeDescription>
<typeDescription>


Annotator:

posTag = "CD";
PennPOSTag pos = new PennPOSTag(aJCas, token.getBegin(),token.getEnd() );
((PennPOSTag)pos).setValue(posTag);


With best regards

E. Buyko



Reply via email to