You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ctakes.apache.org by "Sean Finan (JIRA)" <ji...@apache.org> on 2018/01/30 14:48:00 UTC

[jira] [Created] (CTAKES-493) Create typesystem type "Mention"

Sean Finan created CTAKES-493:
---------------------------------

             Summary: Create typesystem type "Mention"
                 Key: CTAKES-493
                 URL: https://issues.apache.org/jira/browse/CTAKES-493
             Project: cTAKES
          Issue Type: New Feature
          Components: All
    Affects Versions: future enhancement
            Reporter: Sean Finan
            Assignee: Sean Finan


There are two types that are consistently used together: EventMention and EntityMention.  These are both subtypes of IdentifiedAnnotation.  The code for a dozens of annotators and writers is thus:

Collection<IdentifiedAnnotation> annotations = JCasUtil.select( JCas, IdentifiedAnnotation.class);

Collection<IdentifiedAnnotation> wantedAnnotations =

for ( annotations) {

   if ( instanceof EventMention | EntityMention ) \{ wantedAnnotations.add() }

}

 

The first call to JCasUtil iterates through the entire FS, then the second call iterates through the returned sublist.

This would be much more efficient if there were one appropriate parent type that could be returned from the first call, for instance a generic "Mention" type.

True, at this point there isn't a single method that can apply to both mention children and this may be poor OOD, but since they are "types" and not "classes" and since it would add efficiency and clarity throughout the code I think that it is worthwhile.

   



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)