uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alain D├ęsilets <alaindesile...@gmail.com>
Subject Is it possible to define dynamically typed annotations?
Date Sat, 15 Dec 2018 12:20:33 GMT
Is it possible to create dynamically typed annotations in UIMA? In other
words, would it be possible for users of my system to create a new type of
annotation without having to recompile the Java code?

I need this functionality so that non-dev users can define new types of
Named Entities and train a model that can recognize them without having to
recompile the code.

I suspect the answer is no, because all annotation types correspond to a
Java class. True, those classes are defined in an XML file, but in order to
use them you have to generate the Java code from the XML and recompile your
code.

If UIMA does not yet have something that supports dynamic annotations, I
will have to implement one myself. What I have in mind is to define a
sub-class of Annotation called say, DynamicallTypedAnnotation, which would
have two new member variables:

    String typeName = null;
    Map<String,Object> attributes = new HashMap<String,Object>();

The 'typeName' variable would correspond to the type of the annotation (ex:
"Room Number" for an annotation that captures the number of a room) and the
'attributes' variable would allow storage of arbitrary information about
the annotation.

Does that make sense?
Thx

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message