org.apache.ctakes.temporal.ae
Class EventTimeRelationAnnotator

java.lang.Object
  extended by org.apache.uima.analysis_component.AnalysisComponent_ImplBase
      extended by org.apache.uima.analysis_component.Annotator_ImplBase
          extended by org.apache.uima.analysis_component.JCasAnnotator_ImplBase
              extended by org.uimafit.component.JCasAnnotator_ImplBase
                  extended by org.cleartk.classifier.CleartkAnnotator<java.lang.String>
                      extended by org.apache.ctakes.relationextractor.ae.RelationExtractorAnnotator
                          extended by org.apache.ctakes.temporal.ae.EventTimeRelationAnnotator
All Implemented Interfaces:
org.apache.uima.analysis_component.AnalysisComponent, org.uimafit.factory.initializable.Initializable

public class EventTimeRelationAnnotator
extends RelationExtractorAnnotator


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.ctakes.relationextractor.ae.RelationExtractorAnnotator
RelationExtractorAnnotator.IdentifiedAnnotationPair
 
Field Summary
 
Fields inherited from class org.apache.ctakes.relationextractor.ae.RelationExtractorAnnotator
coin, NO_RELATION_CATEGORY, PARAM_PROBABILITY_OF_KEEPING_A_NEGATIVE_EXAMPLE, probabilityOfKeepingANegativeExample
 
Fields inherited from class org.cleartk.classifier.CleartkAnnotator
classifier, dataWriter, PARAM_CLASSIFIER_FACTORY_CLASS_NAME, PARAM_DATA_WRITER_FACTORY_CLASS_NAME, PARAM_IS_TRAINING
 
Constructor Summary
EventTimeRelationAnnotator()
           
 
Method Summary
static org.apache.uima.analysis_engine.AnalysisEngineDescription createAnnotatorDescription(java.io.File modelDirectory)
           
static org.apache.uima.analysis_engine.AnalysisEngineDescription createDataWriterDescription(java.lang.Class<? extends org.cleartk.classifier.DataWriter<java.lang.String>> dataWriterClass, java.io.File outputDirectory, double probabilityOfKeepingANegativeExample)
           
 java.util.List<RelationExtractorAnnotator.IdentifiedAnnotationPair> getCandidateRelationArgumentPairs(org.apache.uima.jcas.JCas jCas, org.apache.uima.jcas.tcas.Annotation sentence)
          Selects the relevant mentions/annotations within a covering annotation for relation identification/extraction.
protected  java.lang.Class<? extends org.apache.uima.jcas.tcas.Annotation> getCoveringClass()
           
protected  java.util.List<RelationFeaturesExtractor> getFeatureExtractors()
          Defines the list of feature extractors used by the classifier.
protected  java.lang.String getRelationCategory(java.util.Map<java.util.List<org.apache.uima.jcas.tcas.Annotation>,BinaryTextRelation> relationLookup, IdentifiedAnnotation arg1, IdentifiedAnnotation arg2)
          Looks up the arguments in the specified lookup table and converts the relation into a label for classification
 
Methods inherited from class org.apache.ctakes.relationextractor.ae.RelationExtractorAnnotator
classify, createRelation, initialize, process
 
Methods inherited from class org.cleartk.classifier.CleartkAnnotator
collectionProcessComplete, isTraining
 
Methods inherited from class org.uimafit.component.JCasAnnotator_ImplBase
getLogger
 
Methods inherited from class org.apache.uima.analysis_component.JCasAnnotator_ImplBase
getRequiredCasInterface, process
 
Methods inherited from class org.apache.uima.analysis_component.Annotator_ImplBase
getCasInstancesRequired, hasNext, next
 
Methods inherited from class org.apache.uima.analysis_component.AnalysisComponent_ImplBase
batchProcessComplete, destroy, getContext, getResultSpecification, reconfigure, setResultSpecification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventTimeRelationAnnotator

public EventTimeRelationAnnotator()
Method Detail

createDataWriterDescription

public static org.apache.uima.analysis_engine.AnalysisEngineDescription createDataWriterDescription(java.lang.Class<? extends org.cleartk.classifier.DataWriter<java.lang.String>> dataWriterClass,
                                                                                                    java.io.File outputDirectory,
                                                                                                    double probabilityOfKeepingANegativeExample)
                                                                                             throws org.apache.uima.resource.ResourceInitializationException
Throws:
org.apache.uima.resource.ResourceInitializationException

createAnnotatorDescription

public static org.apache.uima.analysis_engine.AnalysisEngineDescription createAnnotatorDescription(java.io.File modelDirectory)
                                                                                            throws org.apache.uima.resource.ResourceInitializationException
Throws:
org.apache.uima.resource.ResourceInitializationException

getFeatureExtractors

protected java.util.List<RelationFeaturesExtractor> getFeatureExtractors()
Description copied from class: RelationExtractorAnnotator
Defines the list of feature extractors used by the classifier. Subclasses may override this method to provide a different set of feature extractors.

Overrides:
getFeatureExtractors in class RelationExtractorAnnotator
Returns:
The list of feature extractors to use.

getCoveringClass

protected java.lang.Class<? extends org.apache.uima.jcas.tcas.Annotation> getCoveringClass()
Specified by:
getCoveringClass in class RelationExtractorAnnotator

getCandidateRelationArgumentPairs

public java.util.List<RelationExtractorAnnotator.IdentifiedAnnotationPair> getCandidateRelationArgumentPairs(org.apache.uima.jcas.JCas jCas,
                                                                                                             org.apache.uima.jcas.tcas.Annotation sentence)
Description copied from class: RelationExtractorAnnotator
Selects the relevant mentions/annotations within a covering annotation for relation identification/extraction.

Specified by:
getCandidateRelationArgumentPairs in class RelationExtractorAnnotator

getRelationCategory

protected java.lang.String getRelationCategory(java.util.Map<java.util.List<org.apache.uima.jcas.tcas.Annotation>,BinaryTextRelation> relationLookup,
                                               IdentifiedAnnotation arg1,
                                               IdentifiedAnnotation arg2)
Description copied from class: RelationExtractorAnnotator
Looks up the arguments in the specified lookup table and converts the relation into a label for classification

Overrides:
getRelationCategory in class RelationExtractorAnnotator
Returns:
If this category should not be processed for training return null otherwise it returns the label sent to the datawriter