[ 
https://issues.apache.org/jira/browse/UIMA-6408?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Klügl resolved UIMA-6408.
-------------------------------
    Resolution: Fixed

> Ruta: No type check of features in TRANSFER
> -------------------------------------------
>
>                 Key: UIMA-6408
>                 URL: https://issues.apache.org/jira/browse/UIMA-6408
>             Project: UIMA
>          Issue Type: Bug
>          Components: Ruta
>    Affects Versions: 2.8.1ruta, 3.1.0ruta
>            Reporter: Michael Stenger
>            Assignee: Peter Klügl
>            Priority: Minor
>             Fix For: 3.1.1ruta
>
>
> Hi again.
> I think there is a bug in action TRANSFER when it comes to transferring - or 
> better not transferring - values from a feature of kind A to a feature of 
> type B, where both features have the same identifier. Such an attempt throws 
> an exception in cases where values cannot implicitly be converted. An example:
> Text:
> {noformat}
> alpha beta{noformat}
> Script:
> {noformat}
> DECLARE T1 (Annotation a, STRING ID);
> DECLARE T2 (STRING a, INT ID);
> w:"alpha" {-> CREATE(T1, "a" = w, "ID" = "3ef9")};
> T1 {-> TRANSFER(T2)};{noformat}
> Expected output (new annotations):
>  * {type: T2, begin: 0, end:5, features:{}}
> But throws:
> {noformat}
> org.apache.uima.cas.CASRuntimeException: Trying to access value of feature 
> "Main.T2:a" as "uima.cas.String", but range of feature is 
> "org.apache.uima.ruta.type.RutaBasic".{noformat}
> My suggestion is to only transfer values between features if they are of the 
> same kind, for consistency's sake.
> Best, Michael



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to