uimaruta

Can't convert string to lower case in Ruta


I have a functioning RUTA script. All I want to do is convert a string variable to lowercase doing this ASSIGN(s1, toLowerCase(s2)) where both s1 and s2 are strings. My script works when I do this ASSIGN(s1,s2) but causes an error when I add toLowerCase to my script. The error I get is not very helpful.

2021-08-28 11:27:39 ERROR AnnotateFileHandler:67 - org.apache.uima.resource.ResourceInitializationException: Initialization of annotator class "org.apache.uima.ruta.engine.RutaEngine" failed. (Descriptor: )


Solution

  • I found an answer posted by Peter.

    here

    I had to change the way I was configuring my Ruta engine to import the string functions, like this:

     createEngineDescription(RutaEngine.class,
                RutaEngine.PARAM_MAIN_SCRIPT, "system8.annotator.system8",
                RutaEngine.PARAM_ADDITIONAL_EXTENSIONS,
                new String[]{
                    BooleanOperationsExtension.class.getName(),
                    StringOperationsExtension.class.getName()})
    

    Thank goodness for Peter Kluegl