You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Marshall Schor (JIRA)" <de...@uima.apache.org> on 2012/04/25 19:54:18 UTC

[jira] [Commented] (UIMA-2391) Uima type merging for string subtypes not working

    [ https://issues.apache.org/jira/browse/UIMA-2391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13261849#comment-13261849 ] 

Marshall Schor commented on UIMA-2391:
--------------------------------------

Cases to consider:

a,b,c  merged with a,b,c,d  ==??  a,b,c,d

a,b,c  merged with a,b      ==??  a,b,c

a,b,c  merged with d,e,f    ==?   nothing or a,b,c,d,e,f ?

In the last case, if the merge contains only those allowed values that are in both lists, then it is empty.  If it contains allowed values that are in either list, then it is all of them.  

It seems to me that the idea of merging is to support running multiple independently developed things together, then perhaps the right answer for a,b,c + d,e,f is a,b,c,d,e,f

What do others think?
                
> Uima type merging for string subtypes not working
> -------------------------------------------------
>
>                 Key: UIMA-2391
>                 URL: https://issues.apache.org/jira/browse/UIMA-2391
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>    Affects Versions: 2.3.1AS
>         Environment: Linux on Power
>            Reporter: Charles de Saint-Aignan
>            Priority: Critical
>
> The basic situation is that we are providing a UIMA-based core that other teams can extend to suit their needs.  As such we are making use of UIMA type merging to allow them to add new features to existing types.  This approach works fine since JCasGen merges the two definitions of the given type and produces a superset of the features.  This is well documented here:
> http://uima.apache.org/d/uimaj-2.3.1/references.html#ugr.ref.jcas.merging_types.jcasgen_support 
> However, in addition to this, we have the case where we have a string subtype with given allowedValues - lets say values a, b and c.  The other team wants to extend this type and have additional allowedValues, say value d.  Ideally, what I would like to do is the following (which follows the pattern used for adding features):
> Type Definition #1 (provided by core):
>     <typeDescription>
>       <name>com.ibm.Type</name>
>       <description></description>
>       <supertypeName>uima.cas.String</supertypeName>
>       <allowedValues>
>         <value>
>           <string>a</string>
>           <description></description>
>         </value>
>         <value>
>           <string>b</string>
>           <description></description>
>         </value>
>         <value>
>           <string>c</string>
>           <description></description>
>         </value>
>       </allowedValues>
>     </typeDescription>	    
> Type Definition #2 (extension to core):
>     <typeDescription>
>       <name>com.ibm.Type</name>
>       <description></description>
>       <supertypeName>uima.cas.String</supertypeName>
>       <allowedValues>
>         <value>
>           <string>d</string>
>           <description></description>
>         </value>
>       </allowedValues>
>     </typeDescription>
> In this case I wanted UIMA to recognize the two definitions at runtime and allow the superset of allowedValues.  However, this does not do the trick - at runtime UIMA throws an exception saying that value d is not an allowed value for com.ibm.Type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira