@PipeBitInfo(name="E-T CNN TLinker", description="Creates Event - Time TLinks with Convolutional Neural Network.", dependencies={SENTENCE,EVENT,TIMEX}, products=TEMPORAL_RELATION) public class EventTimeCNNAnnotator extends org.cleartk.ml.CleartkAnnotator<String>
Modifier and Type | Field and Description |
---|---|
static String |
NO_RELATION_CATEGORY |
Constructor and Description |
---|
EventTimeCNNAnnotator() |
Modifier and Type | Method and Description |
---|---|
protected void |
createRelation(org.apache.uima.jcas.JCas jCas,
IdentifiedAnnotation arg1,
IdentifiedAnnotation arg2,
String predictedCategory,
double confidence) |
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)
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.