org.cleartk.timeml.event
Class EventPolarityAnnotator

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<OUTCOME_TYPE>
                      extended by org.cleartk.timeml.event.EventAttributeAnnotator<String>
                          extended by org.cleartk.timeml.event.EventPolarityAnnotator
All Implemented Interfaces:
org.apache.uima.analysis_component.AnalysisComponent, org.uimafit.factory.initializable.Initializable

public class EventPolarityAnnotator
extends EventAttributeAnnotator<String>


Copyright (c) 2010, Regents of the University of Colorado
All rights reserved. Annotator for the "polarity" attribute of TimeML EVENTs.

Author:
Steven Bethard

Field Summary
static CleartkInternalModelFactory FACTORY
           
 
Fields inherited from class org.cleartk.timeml.event.EventAttributeAnnotator
contextExtractors, eventFeatureExtractors
 
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
EventPolarityAnnotator()
           
 
Method Summary
protected  String getAttribute(org.cleartk.timeml.type.Event event)
          Get the attribute value from the Event annotation.
protected  String getDefaultValue()
          The attribute value that should be considered as a default, e.g.
 void initialize(org.apache.uima.UimaContext context)
           
protected  void setAttribute(org.cleartk.timeml.type.Event event, String value)
          Set the attribute value on the Event annotation.
 
Methods inherited from class org.cleartk.timeml.event.EventAttributeAnnotator
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
 

Field Detail

FACTORY

public static final CleartkInternalModelFactory FACTORY
Constructor Detail

EventPolarityAnnotator

public EventPolarityAnnotator()
Method Detail

initialize

public void initialize(org.apache.uima.UimaContext context)
                throws org.apache.uima.resource.ResourceInitializationException
Specified by:
initialize in interface org.apache.uima.analysis_component.AnalysisComponent
Specified by:
initialize in interface org.uimafit.factory.initializable.Initializable
Overrides:
initialize in class EventAttributeAnnotator<String>
Throws:
org.apache.uima.resource.ResourceInitializationException

getDefaultValue

protected String getDefaultValue()
Description copied from class: EventAttributeAnnotator
The attribute value that should be considered as a default, e.g. "NONE". When the attribute value is null in the CAS, this value will be used instead. Additionally, when the classifier produces this value, no attribute will be added.

Specified by:
getDefaultValue in class EventAttributeAnnotator<String>
Returns:
The default attribute value.

getAttribute

protected String getAttribute(org.cleartk.timeml.type.Event event)
Description copied from class: EventAttributeAnnotator
Get the attribute value from the Event annotation. Typically this will be by calling something like Event.getTense(). If this method returns null, EventAttributeAnnotator.getDefaultValue() will be called to produce an appropriate attribute value.

Specified by:
getAttribute in class EventAttributeAnnotator<String>
Parameters:
event - The Event annotation whose attribute is to be retrieved.
Returns:
The selected attribute value.

setAttribute

protected void setAttribute(org.cleartk.timeml.type.Event event,
                            String value)
Description copied from class: EventAttributeAnnotator
Set the attribute value on the Event annotation. Typically this will be by calling something like Event.setTense(String). This method will not be called if the value is equal to EventAttributeAnnotator.getDefaultValue().

Specified by:
setAttribute in class EventAttributeAnnotator<String>
Parameters:
event - The Event annotation whose attribute is to be set.
value - The new attribute value.


Copyright © 2013. All Rights Reserved.