3

does somebody know what is wrong with my String Concatenation in Ruta?


    FOREACH (d) IngredientConcept{} {
    d{->CREATE(Entity, "label"="Drug", "value"= d.conceptID + "_" + d.dictCanon)};
    }

Caused by: org.apache.uima.ruta.extensions.RutaParseRuntimeException: Error in Anonymous, line 28, "+": expected RPAREN, but found PLUS

Thanks for your help. Philipp

1 Answers1

4

Have you tried this: "value"= "" + d.conceptID + "_" + d.dictCanon

  • Yes, this works. It's not quite self-explanatory that you have to put quotation marks at the beginning of a string concatentation. That may be useful to be fixed in a future Ruta version. Thank you very much for your help. – Philipp Daumke May 16 '19 at 14:21
  • The leading quotes are required for UIMA Ruta 2.7.0 (at least). – Peter Kluegl May 22 '19 at 10:42