@PipeBitInfo(name="E-T POS and Token TLinker", description="Creates Event - Time TLinks from Part of Speech and Token Type.", dependencies={SECTION,SENTENCE,EVENT,TIMEX}, products=TEMPORAL_RELATION) public class EventTimeTokenAndPosBasedAnnotator extends org.cleartk.ml.CleartkAnnotator<String>
Modifier and Type | Field and Description |
---|---|
static String |
NO_RELATION_CATEGORY |
Constructor and Description |
---|
EventTimeTokenAndPosBasedAnnotator() |
Modifier and Type | Method and Description |
---|---|
protected void |
createRelation(org.apache.uima.jcas.JCas jCas,
IdentifiedAnnotation arg1,
IdentifiedAnnotation arg2,
String predictedCategory,
double confidence) |
List<TemporalRelationExtractorAnnotator.IdentifiedAnnotationPair> |
getCandidateRelationArgumentPairs(org.apache.uima.jcas.JCas jCas,
org.apache.uima.jcas.tcas.Annotation sentence) |
protected String |
getRelationCategory(Map<List<org.apache.uima.jcas.tcas.Annotation>,BinaryTextRelation> relationLookup,
IdentifiedAnnotation arg1,
IdentifiedAnnotation arg2)
Dima's way of getting lables
|
static String |
getTokensBetweenExpanded(org.apache.uima.jcas.JCas jCas,
Sentence sent,
org.apache.uima.jcas.tcas.Annotation left,
String leftType,
org.apache.uima.jcas.tcas.Annotation right,
String rightType,
int contextSize,
Map<EventMention,Collection<EventMention>> coveringMap)
Print context from left to right.
|
void |
process(org.apache.uima.jcas.JCas jCas) |
collectionProcessComplete, initialize, isTraining
getRequiredCasInterface, process
getCasInstancesRequired, hasNext, next
public static final String NO_RELATION_CATEGORY
public void process(org.apache.uima.jcas.JCas jCas) throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
process
in class org.apache.uima.analysis_component.JCasAnnotator_ImplBase
org.apache.uima.analysis_engine.AnalysisEngineProcessException
public static String getTokensBetweenExpanded(org.apache.uima.jcas.JCas jCas, Sentence sent, org.apache.uima.jcas.tcas.Annotation left, String leftType, org.apache.uima.jcas.tcas.Annotation right, String rightType, int contextSize, Map<EventMention,Collection<EventMention>> coveringMap)
contextSize
- number of tokens to include on the left of arg1 and on the right of arg2protected String getRelationCategory(Map<List<org.apache.uima.jcas.tcas.Annotation>,BinaryTextRelation> relationLookup, IdentifiedAnnotation arg1, IdentifiedAnnotation arg2)
relationLookup
- arg1
- arg2
- protected void createRelation(org.apache.uima.jcas.JCas jCas, IdentifiedAnnotation arg1, IdentifiedAnnotation arg2, String predictedCategory, double confidence)
public List<TemporalRelationExtractorAnnotator.IdentifiedAnnotationPair> getCandidateRelationArgumentPairs(org.apache.uima.jcas.JCas jCas, org.apache.uima.jcas.tcas.Annotation sentence)
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.