org.cleartk.timeml.event
Class EventAttributeAnnotator<OUTCOME_TYPE>
java.lang.Object
org.apache.uima.analysis_component.AnalysisComponent_ImplBase
org.apache.uima.analysis_component.Annotator_ImplBase
org.apache.uima.analysis_component.JCasAnnotator_ImplBase
org.uimafit.component.JCasAnnotator_ImplBase
org.cleartk.classifier.CleartkAnnotator<OUTCOME_TYPE>
org.cleartk.timeml.event.EventAttributeAnnotator<OUTCOME_TYPE>
- All Implemented Interfaces:
- org.apache.uima.analysis_component.AnalysisComponent, org.uimafit.factory.initializable.Initializable
- Direct Known Subclasses:
- EventAspectAnnotator, EventClassAnnotator, EventModalityAnnotator, EventPolarityAnnotator, EventTenseAnnotator
public abstract class EventAttributeAnnotator<OUTCOME_TYPE>
- extends org.cleartk.classifier.CleartkAnnotator<OUTCOME_TYPE>
Copyright (c) 2010, Regents of the University of Colorado
All rights reserved.
Base class for annotators of TimeML EVENT attributes.
- Author:
- Steven Bethard
|
Field Summary |
protected List<org.cleartk.classifier.feature.extractor.CleartkExtractor> |
contextExtractors
The list of feature extractors that will be applied to the Event annotation, with a Sentence
window. |
protected List<org.cleartk.classifier.feature.extractor.simple.SimpleFeatureExtractor> |
eventFeatureExtractors
The list of feature extractors that will be applied directly to the Event annotation. |
| Fields inherited from class org.cleartk.classifier.CleartkAnnotator |
classifier, dataWriter, PARAM_CLASSIFIER_FACTORY_CLASS_NAME, PARAM_DATA_WRITER_FACTORY_CLASS_NAME, PARAM_IS_TRAINING |
|
Method Summary |
protected abstract OUTCOME_TYPE |
getAttribute(org.cleartk.timeml.type.Event event)
Get the attribute value from the Event annotation. |
protected abstract OUTCOME_TYPE |
getDefaultValue()
The attribute value that should be considered as a default, e.g. |
void |
initialize(org.apache.uima.UimaContext context)
|
void |
process(org.apache.uima.jcas.JCas jCas)
|
protected abstract void |
setAttribute(org.cleartk.timeml.type.Event event,
OUTCOME_TYPE value)
Set the attribute value on the Event annotation. |
| 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 |
eventFeatureExtractors
protected List<org.cleartk.classifier.feature.extractor.simple.SimpleFeatureExtractor> eventFeatureExtractors
- The list of feature extractors that will be applied directly to the Event annotation.
Subclasses should override
initialize(org.apache.uima.UimaContext) to fill this list.
contextExtractors
protected List<org.cleartk.classifier.feature.extractor.CleartkExtractor> contextExtractors
- The list of feature extractors that will be applied to the Event annotation, with a Sentence
window.
Subclasses should override
initialize(org.apache.uima.UimaContext) to fill this list.
EventAttributeAnnotator
public EventAttributeAnnotator()
getDefaultValue
protected abstract OUTCOME_TYPE getDefaultValue()
- 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.
- Returns:
- The default attribute value.
getAttribute
protected abstract OUTCOME_TYPE getAttribute(org.cleartk.timeml.type.Event event)
- Get the attribute value from the Event annotation. Typically this will be by calling something
like
Event.getTense().
If this method returns null, getDefaultValue() will be called to produce an
appropriate attribute value.
- Parameters:
event - The Event annotation whose attribute is to be retrieved.
- Returns:
- The selected attribute value.
setAttribute
protected abstract void setAttribute(org.cleartk.timeml.type.Event event,
OUTCOME_TYPE value)
- 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 getDefaultValue().
- Parameters:
event - The Event annotation whose attribute is to be set.value - The new attribute value.
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 org.cleartk.classifier.CleartkAnnotator<OUTCOME_TYPE>
- Throws:
org.apache.uima.resource.ResourceInitializationException
process
public void process(org.apache.uima.jcas.JCas jCas)
throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
- Specified by:
process in class org.apache.uima.analysis_component.JCasAnnotator_ImplBase
- Throws:
org.apache.uima.analysis_engine.AnalysisEngineProcessException
Copyright © 2013. All Rights Reserved.