@PipeBitInfo(name="Event Coreference Annotator", description="Annotates Event Coreferences.", dependencies={SECTION,DEPENDENCY_NODE,IDENTIFIED_ANNOTATION,MARKABLE}, products=COREFERENCE_RELATION) public class EventCoreferenceAnnotator extends RelationExtractorAnnotator
Modifier and Type | Class and Description |
---|---|
class |
EventCoreferenceAnnotator.IdentifiedAnnotationPairComparator |
class |
EventCoreferenceAnnotator.MarkableConfidenceComparator |
class |
EventCoreferenceAnnotator.MarkablePairConfidenceComparator |
RelationExtractorAnnotator.IdentifiedAnnotationPair
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_PAR_SIM |
static boolean |
DEFAULT_SCORE_ALL |
static int |
DEFAULT_SENT_DIST |
protected HashSet<IdentifiedAnnotation> |
foundAnaphors |
static String |
IDENTITY_RELATION |
static String |
PARAM_PAR_SIM |
static String |
PARAM_SCORE_ALL |
static String |
PARAM_SENT_DIST |
category_frequency, coin, NO_RELATION_CATEGORY, PARAM_PROBABILITY_OF_KEEPING_A_NEGATIVE_EXAMPLE, probabilityOfKeepingANegativeExample
Constructor and Description |
---|
EventCoreferenceAnnotator() |
Modifier and Type | Method and Description |
---|---|
protected String |
classify(List<org.cleartk.ml.Feature> features)
Predict an outcome given a set of features.
|
void |
collectionProcessComplete() |
static org.apache.uima.analysis_engine.AnalysisEngineDescription |
createAnnotatorDescription(String modelPath) |
static org.apache.uima.analysis_engine.AnalysisEngineDescription |
createDataWriterDescription(Class<? extends org.cleartk.ml.DataWriter<String>> dataWriterClass,
File outputDirectory,
float downsamplingRate) |
protected void |
createRelation(org.apache.uima.jcas.JCas jCas,
IdentifiedAnnotation ante,
IdentifiedAnnotation ana,
String predictedCategory)
Create a UIMA relation type based on arguments and the relation label.
|
static org.apache.uima.analysis_engine.AnalysisEngineDescription |
createScoringAnnotatorDescription(String modelPath) |
static boolean |
dominates(org.apache.uima.jcas.tcas.Annotation arg1,
org.apache.uima.jcas.tcas.Annotation arg2) |
List<RelationExtractorAnnotator.IdentifiedAnnotationPair> |
getAlreadyLinkedPairs(org.apache.uima.jcas.JCas jcas,
org.apache.uima.jcas.tcas.Annotation segment) |
Set<String> |
getBestEnt(org.apache.uima.jcas.JCas jcas,
Markable markable) |
protected Iterable<RelationExtractorAnnotator.IdentifiedAnnotationPair> |
getCandidateRelationArgumentPairs(org.apache.uima.jcas.JCas jcas,
org.apache.uima.jcas.tcas.Annotation segment)
Selects the relevant mentions/annotations within a covering annotation for
relation identification/extraction.
|
List<RelationExtractorAnnotator.IdentifiedAnnotationPair> |
getClosePairs(org.apache.uima.jcas.JCas jcas,
org.apache.uima.jcas.tcas.Annotation segment,
double confidence) |
List<RelationExtractorAnnotator.IdentifiedAnnotationPair> |
getConfidentPairs(org.apache.uima.jcas.JCas jcas,
org.apache.uima.jcas.tcas.Annotation segment,
double threshold) |
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.
|
List<RelationExtractorAnnotator.IdentifiedAnnotationPair> |
getHeadwordMatchingPairs(org.apache.uima.jcas.JCas jcas,
org.apache.uima.jcas.tcas.Annotation segment) |
List<RelationExtractorAnnotator.IdentifiedAnnotationPair> |
getParagraphPairs(org.apache.uima.jcas.JCas jcas,
org.apache.uima.jcas.tcas.Annotation segment) |
protected String |
getRelationCategory(Map<List<org.apache.uima.jcas.tcas.Annotation>,BinaryTextRelation> relationLookup,
IdentifiedAnnotation ante,
IdentifiedAnnotation ana)
Looks up the arguments in the specified lookup table and converts the
relation into a label for classification
|
protected Class<? extends BinaryTextRelation> |
getRelationClass() |
List<RelationExtractorAnnotator.IdentifiedAnnotationPair> |
getSectionHeaderPairs(org.apache.uima.jcas.JCas jcas,
org.apache.uima.jcas.tcas.Annotation segment,
double confidence) |
List<RelationExtractorAnnotator.IdentifiedAnnotationPair> |
getSimilarPairs(org.apache.uima.jcas.JCas jcas,
org.apache.uima.jcas.tcas.Annotation segment) |
void |
process(org.apache.uima.jcas.JCas jCas) |
static int |
sentDist(org.apache.uima.jcas.JCas jcas,
IdentifiedAnnotation arg1,
IdentifiedAnnotation arg2) |
static int |
sentsBetween(IdentifiedAnnotation arg1,
IdentifiedAnnotation arg2) |
clearCategoryFrequency, initialize
getRequiredCasInterface, process
getCasInstancesRequired, hasNext, next
public static final String IDENTITY_RELATION
public static final int DEFAULT_SENT_DIST
public static final String PARAM_SENT_DIST
public static final double DEFAULT_PAR_SIM
public static final String PARAM_PAR_SIM
public static final boolean DEFAULT_SCORE_ALL
public static final String PARAM_SCORE_ALL
protected HashSet<IdentifiedAnnotation> foundAnaphors
public static org.apache.uima.analysis_engine.AnalysisEngineDescription createDataWriterDescription(Class<? extends org.cleartk.ml.DataWriter<String>> dataWriterClass, File outputDirectory, float downsamplingRate) throws org.apache.uima.resource.ResourceInitializationException
org.apache.uima.resource.ResourceInitializationException
public static org.apache.uima.analysis_engine.AnalysisEngineDescription createAnnotatorDescription(String modelPath) throws org.apache.uima.resource.ResourceInitializationException
org.apache.uima.resource.ResourceInitializationException
public static org.apache.uima.analysis_engine.AnalysisEngineDescription createScoringAnnotatorDescription(String modelPath) throws org.apache.uima.resource.ResourceInitializationException
org.apache.uima.resource.ResourceInitializationException
protected List<RelationFeaturesExtractor<IdentifiedAnnotation,IdentifiedAnnotation>> getFeatureExtractors()
RelationExtractorAnnotator
getFeatureExtractors
in class RelationExtractorAnnotator
public void process(org.apache.uima.jcas.JCas jCas) throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
process
in class RelationExtractorAnnotator
org.apache.uima.analysis_engine.AnalysisEngineProcessException
public void collectionProcessComplete() throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
collectionProcessComplete
in interface org.apache.uima.analysis_component.AnalysisComponent
collectionProcessComplete
in class org.cleartk.ml.CleartkAnnotator<String>
org.apache.uima.analysis_engine.AnalysisEngineProcessException
protected Iterable<RelationExtractorAnnotator.IdentifiedAnnotationPair> getCandidateRelationArgumentPairs(org.apache.uima.jcas.JCas jcas, org.apache.uima.jcas.tcas.Annotation segment)
RelationExtractorAnnotator
getCandidateRelationArgumentPairs
in class RelationExtractorAnnotator
public List<RelationExtractorAnnotator.IdentifiedAnnotationPair> getClosePairs(org.apache.uima.jcas.JCas jcas, org.apache.uima.jcas.tcas.Annotation segment, double confidence)
public static boolean dominates(org.apache.uima.jcas.tcas.Annotation arg1, org.apache.uima.jcas.tcas.Annotation arg2)
public List<RelationExtractorAnnotator.IdentifiedAnnotationPair> getParagraphPairs(org.apache.uima.jcas.JCas jcas, org.apache.uima.jcas.tcas.Annotation segment)
public List<RelationExtractorAnnotator.IdentifiedAnnotationPair> getSimilarPairs(org.apache.uima.jcas.JCas jcas, org.apache.uima.jcas.tcas.Annotation segment)
public List<RelationExtractorAnnotator.IdentifiedAnnotationPair> getConfidentPairs(org.apache.uima.jcas.JCas jcas, org.apache.uima.jcas.tcas.Annotation segment, double threshold)
public List<RelationExtractorAnnotator.IdentifiedAnnotationPair> getSectionHeaderPairs(org.apache.uima.jcas.JCas jcas, org.apache.uima.jcas.tcas.Annotation segment, double confidence)
public List<RelationExtractorAnnotator.IdentifiedAnnotationPair> getAlreadyLinkedPairs(org.apache.uima.jcas.JCas jcas, org.apache.uima.jcas.tcas.Annotation segment)
public List<RelationExtractorAnnotator.IdentifiedAnnotationPair> getHeadwordMatchingPairs(org.apache.uima.jcas.JCas jcas, org.apache.uima.jcas.tcas.Annotation segment)
protected String classify(List<org.cleartk.ml.Feature> features) throws org.cleartk.ml.CleartkProcessingException
RelationExtractorAnnotator
classifier
. Subclasses may override
this method to implement more complex classification procedures.classify
in class RelationExtractorAnnotator
features
- The features to be classified.org.cleartk.ml.CleartkProcessingException
protected Class<? extends org.apache.uima.jcas.tcas.Annotation> getCoveringClass()
getCoveringClass
in class RelationExtractorAnnotator
protected Class<? extends BinaryTextRelation> getRelationClass()
getRelationClass
in class RelationExtractorAnnotator
protected void createRelation(org.apache.uima.jcas.JCas jCas, IdentifiedAnnotation ante, IdentifiedAnnotation ana, String predictedCategory)
RelationExtractorAnnotator
createRelation
in class RelationExtractorAnnotator
jCas
- - JCas object, needed to create new UIMA typesante
- - First argument to relationana
- - Second argument to relationpredictedCategory
- - Name of relationprotected String getRelationCategory(Map<List<org.apache.uima.jcas.tcas.Annotation>,BinaryTextRelation> relationLookup, IdentifiedAnnotation ante, IdentifiedAnnotation ana)
RelationExtractorAnnotator
getRelationCategory
in class RelationExtractorAnnotator
public static int sentDist(org.apache.uima.jcas.JCas jcas, IdentifiedAnnotation arg1, IdentifiedAnnotation arg2)
public static int sentsBetween(IdentifiedAnnotation arg1, IdentifiedAnnotation arg2)
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.