You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Peter Klügl (Jira)" <de...@uima.apache.org> on 2022/01/07 08:34:00 UTC

[jira] [Work started] (UIMA-6408) Ruta: No type check of features in TRANSFER

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

Work on UIMA-6408 started by Peter Klügl.
-----------------------------------------
> 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: 2.9.0ruta, 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)