typeFromString Action throws exception-uima ruta

44 views Asked by At

The below code throws the error: Action "typeFromString" is not defined.

CW{-> typeFromString("Person")};

From the documentation, I understand that 'Person' is the name of an annotation that need not be declared already using DECLARE statement and that all CW's will be marked as 'Person'. Please correct me if I'm wrong and let me know how to resolve the above error.

1

There are 1 answers

0
Peter Kluegl On

There are two problems:

  1. The type function typeFromString throws an exception if the type is not defined in the typesystem of the CAS (should be fixed). Short names work if they are unambiguous.
  2. The editor reports a false error for the type function if it is used as an implicit action. This can be avoided by using CW{-> MARK(typeFromString("Person"))};. typeFromString is not an action but a function returing a type.

DISCLAIMER: I am a developer of UIMA Ruta