Uploaded image for project: 'cTAKES'
  1. cTAKES
  2. CTAKES-493

Create typesystem type "Mention"

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: future enhancement
    • Fix Version/s: None
    • Component/s: All

      Description

      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.

         

        Attachments

          Activity

            People

            • Assignee:
              seanfinan Sean Finan
              Reporter:
              seanfinan Sean Finan
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: