Skip to content

SemanticGroup

Sean Finan edited this page Feb 9, 2026 · 1 revision

public enum SemanticGroup

The major UMLS-related semantic groups as decided at the inception of cTAKES. The major 5 groups are:

Medication 
Disease/Disorder 
Sign/Symptom 
Procedure 
Anatomical Site 

Minor groups are:

Clinical Attribute 
Device 
Lab 
Phenomenon 
Subject 
Person Title 
Event 
Entity 
Time 
Modifier 
Lab Modifier 
Unknown



public int getCode()

  • Returns: internal cTAKES CONST code for group. These were old constants that shouldn't be used.

public String getName()

  • Returns: Short name for the group. e.g. "Disease" or "Drug".

public String getLongName()

  • Returns: Long name for the group. e.g. "Disease/Disorder" or "Medication".

public Class<? extends IdentifiedAnnotation> getCtakesClass()

  • Returns: the cTAKES java / type system class that represents the group.

public Function<JCas, ? extends IdentifiedAnnotation> getCreator()

  • Returns: A function that can create the java / type system class that represents the group.

static public SemanticGroup getGroup( final int code )

  • Parameters:
    • code internal cTAKES CONST code for a group. These were old constants that shouldn't be used.
  • Returns: the group with the given code.

static public SemanticGroup getGroup( final String name )

  • Parameters:
    • name -short- name for a group.
  • Returns: the group with the given -short- name.

static public SemanticGroup getGroupFromOld( final String name )

  • Parameters:
    • name old name for a group. These were old constants that shouldn't be used.
  • Returns: the group with the given -short- name.

static public Collection<SemanticGroup> getGroups( final IdentifiedAnnotation annotation )

  • Parameters:
    • annotation Some annotation.
  • Returns: The groups appropriate for the annotation. Done using known TUIs for the annotation.

static private final class BestGrouper implements Comparator<SemanticGroup>

Compares two groups for the most descriptive/accurate. e.g. Procedure is before Phenomenon.

static public SemanticGroup getBestGroup( final IdentifiedAnnotation annotation )

  • Parameters:
    • annotation Some annotation.
  • Returns: The most appropriate group for the annotation. Done using known TUIs for the annotation.

static public SemanticGroup getBestGroup( final Collection<SemanticGroup> groups )

  • Parameters:
    • groups collection of groups.
  • Returns: The most appropriate group for the annotation.

static private SemanticGroup getBestTypeIdGroup( final IdentifiedAnnotation annotation )

Gets the best group based upon internal cTAKES type code for a group. These were old constants that shouldn't be used. However, an annotation may have a type id but no TUIs.

  • Parameters:
    • annotation -
  • Returns: the group based upon a type id set in the annotation.

Apache cTAKES

ctakes-core API

Python API

ctakes-core

patient
    AbstractPatientConsumer
    AbstractPatientFileWriter
    PatientNoteCollector
    PatientNoteStore
    PatientViewUtil
pipeline
    PipeBitLocator
    PipelineBuilder
    PiperFileReader
    PiperFileRunner
resource
    FileLocator
util
    CalendarUtil
    MutableUimaContext
    NumberedSuffixComparator
    Pair
    RelationArgumentUtil
    StringUtil
     annotation
         ConceptBuilder
         EssentialAnnotationUtil
         IdentifiedAnnotationBuilder
         IdentifiedAnnotationUtil
         OntologyConceptUtil
         SemanticGroup
         SemanticTui
     doc
         DocIdUtil
         JCasBuilder
         TextBySectionBuilder
         TextBySentenceBuilder
     log
         DotLogger
         FinishedLogger
     regex
         RegexSpanFinder
         TimeoutMatcher
     textspan
         DefaultAspanComparator
         DefaultTextSpanComparator
         DefaultTextSpan
         TextSpan



General

Clone this wiki locally