Description
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:
alpha beta
Script:
DECLARE T1 (Annotation a, STRING ID); DECLARE T2 (STRING a, INT ID); w:"alpha" {-> CREATE(T1, "a" = w, "ID" = "3ef9")}; T1 {-> TRANSFER(T2)};
Expected output (new annotations):
- {type: T2, begin: 0, end:5, features:{}}
But throws:
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".
My suggestion is to only transfer values between features if they are of the same kind, for consistency's sake.
Best, Michael
Attachments
Issue Links
- links to