@PipeBitInfo(name="E-T Consecutive Sentence TLinker", description="Creates Event - Time TLinks between consecutive sentences.", dependencies={SECTION,SENTENCE,EVENT,TIMEX}, products=TEMPORAL_RELATION) public class ConsecutiveSentencesEventTimeRelationAnnotator extends RelationExtractorAnnotator
RelationExtractorAnnotator.IdentifiedAnnotationPair
category_frequency, coin, NO_RELATION_CATEGORY, PARAM_PROBABILITY_OF_KEEPING_A_NEGATIVE_EXAMPLE, probabilityOfKeepingANegativeExample
Constructor and Description |
---|
ConsecutiveSentencesEventTimeRelationAnnotator() |
Modifier and Type | Method and Description |
---|---|
static org.apache.uima.analysis_engine.AnalysisEngineDescription |
createAnnotatorDescription(File modelDirectory) |
static org.apache.uima.analysis_engine.AnalysisEngineDescription |
createDataWriterDescription(Class<? extends org.cleartk.ml.DataWriter<String>> dataWriterClass,
File outputDirectory,
double probabilityOfKeepingANegativeExample) |
protected void |
createRelation(org.apache.uima.jcas.JCas jCas,
IdentifiedAnnotation arg1,
IdentifiedAnnotation arg2,
String predictedCategory)
Create a UIMA relation type based on arguments and the relation label.
|
List<RelationExtractorAnnotator.IdentifiedAnnotationPair> |
getCandidateRelationArgumentPairs(org.apache.uima.jcas.JCas jCas,
org.apache.uima.jcas.tcas.Annotation document)
Selects the relevant mentions/annotations within a covering annotation for
relation identification/extraction.
|
protected Class<? extends org.apache.uima.jcas.tcas.Annotation> |
getCoveringClass() |
protected List<RelationFeaturesExtractor<IdentifiedAnnotation,IdentifiedAnnotation>> |
getFeatureExtractors()
Defines the list of feature extractors used by the classifier.
|
protected String |
getRelationCategory(Map<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
|
classify, clearCategoryFrequency, getRelationClass, initialize, process
getRequiredCasInterface, process
getCasInstancesRequired, hasNext, next
public ConsecutiveSentencesEventTimeRelationAnnotator()
public static org.apache.uima.analysis_engine.AnalysisEngineDescription createDataWriterDescription(Class<? extends org.cleartk.ml.DataWriter<String>> dataWriterClass, File outputDirectory, double probabilityOfKeepingANegativeExample) throws org.apache.uima.resource.ResourceInitializationException
org.apache.uima.resource.ResourceInitializationException
public static org.apache.uima.analysis_engine.AnalysisEngineDescription createAnnotatorDescription(File modelDirectory) throws org.apache.uima.resource.ResourceInitializationException
org.apache.uima.resource.ResourceInitializationException
protected List<RelationFeaturesExtractor<IdentifiedAnnotation,IdentifiedAnnotation>> getFeatureExtractors()
RelationExtractorAnnotator
getFeatureExtractors
in class RelationExtractorAnnotator
protected Class<? extends org.apache.uima.jcas.tcas.Annotation> getCoveringClass()
getCoveringClass
in class RelationExtractorAnnotator
public List<RelationExtractorAnnotator.IdentifiedAnnotationPair> getCandidateRelationArgumentPairs(org.apache.uima.jcas.JCas jCas, org.apache.uima.jcas.tcas.Annotation document)
RelationExtractorAnnotator
getCandidateRelationArgumentPairs
in class RelationExtractorAnnotator
protected void createRelation(org.apache.uima.jcas.JCas jCas, IdentifiedAnnotation arg1, IdentifiedAnnotation arg2, String predictedCategory)
RelationExtractorAnnotator
createRelation
in class RelationExtractorAnnotator
jCas
- - JCas object, needed to create new UIMA typesarg1
- - First argument to relationarg2
- - Second argument to relationpredictedCategory
- - Name of relationprotected String getRelationCategory(Map<List<org.apache.uima.jcas.tcas.Annotation>,BinaryTextRelation> relationLookup, IdentifiedAnnotation arg1, IdentifiedAnnotation arg2)
RelationExtractorAnnotator
getRelationCategory
in class RelationExtractorAnnotator
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.