@PipeBitInfo(name="Coreference (Clusters)", description="Coreference annotator using mention-synchronous paradigm.", dependencies={BASE_TOKEN,SENTENCE,SECTION,IDENTIFIED_ANNOTATION,MARKABLE}, products=COREFERENCE_RELATION) public class MentionClusterCoreferenceAnnotator extends org.cleartk.ml.CleartkAnnotator<String>
Modifier and Type | Class and Description |
---|---|
static class |
MentionClusterCoreferenceAnnotator.CollectionTextRelationIdentifiedAnnotationPair |
Modifier and Type | Field and Description |
---|---|
protected Random |
coin |
static String |
NO_RELATION_CATEGORY |
static String |
PARAM_PROBABILITY_OF_KEEPING_A_NEGATIVE_EXAMPLE |
static String |
PARAM_USE_EXISTING_ENCODERS |
protected double |
probabilityOfKeepingANegativeExample |
Constructor and Description |
---|
MentionClusterCoreferenceAnnotator() |
Modifier and Type | Method and Description |
---|---|
protected String |
classify(List<org.cleartk.ml.Feature> features)
Predict an outcome given a set of features.
|
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,
CollectionTextRelation cluster,
IdentifiedAnnotation mention,
String predictedCategory,
Double confidence)
Create a UIMA relation type based on arguments and the relation label.
|
protected Iterable<MentionClusterCoreferenceAnnotator.CollectionTextRelationIdentifiedAnnotationPair> |
getCandidateRelationArgumentPairs(org.apache.uima.jcas.JCas jcas,
Markable mention) |
protected List<RelationFeaturesExtractor<CollectionTextRelation,IdentifiedAnnotation>> |
getFeatureExtractors() |
Map<RelationExtractorEvaluation.HashableArguments,Double> |
getMarkablePairScores(org.apache.uima.jcas.JCas jCas) |
protected List<org.cleartk.ml.feature.extractor.FeatureExtractor1<Markable>> |
getMentionExtractors() |
protected List<ClusterMentionPairer_ImplBase> |
getPairExtractors() |
protected String |
getRelationCategory(Map<MentionClusterCoreferenceAnnotator.CollectionTextRelationIdentifiedAnnotationPair,CollectionTextRelationIdentifiedAnnotationRelation> relationLookup,
CollectionTextRelation cluster,
IdentifiedAnnotation mention)
Looks up the arguments in the specified lookup table and converts the
relation into a label for classification
|
void |
initialize(org.apache.uima.UimaContext context) |
void |
process(org.apache.uima.jcas.JCas jCas) |
getRequiredCasInterface, process
getCasInstancesRequired, hasNext, next
public static final String NO_RELATION_CATEGORY
public static final String PARAM_PROBABILITY_OF_KEEPING_A_NEGATIVE_EXAMPLE
protected double probabilityOfKeepingANegativeExample
public static final String PARAM_USE_EXISTING_ENCODERS
protected Random coin
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
protected List<RelationFeaturesExtractor<CollectionTextRelation,IdentifiedAnnotation>> getFeatureExtractors()
protected List<org.cleartk.ml.feature.extractor.FeatureExtractor1<Markable>> getMentionExtractors()
protected List<ClusterMentionPairer_ImplBase> getPairExtractors()
protected Iterable<MentionClusterCoreferenceAnnotator.CollectionTextRelationIdentifiedAnnotationPair> getCandidateRelationArgumentPairs(org.apache.uima.jcas.JCas jcas, Markable mention)
public void initialize(org.apache.uima.UimaContext context) throws org.apache.uima.resource.ResourceInitializationException
initialize
in interface org.apache.uima.analysis_component.AnalysisComponent
initialize
in interface org.apache.uima.fit.factory.initializable.Initializable
initialize
in class org.cleartk.ml.CleartkAnnotator<String>
org.apache.uima.resource.ResourceInitializationException
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
protected String getRelationCategory(Map<MentionClusterCoreferenceAnnotator.CollectionTextRelationIdentifiedAnnotationPair,CollectionTextRelationIdentifiedAnnotationRelation> relationLookup, CollectionTextRelation cluster, IdentifiedAnnotation mention)
protected String classify(List<org.cleartk.ml.Feature> features) throws org.cleartk.ml.CleartkProcessingException
classifier
. Subclasses may override
this method to implement more complex classification procedures.features
- The features to be classified.org.cleartk.ml.CleartkProcessingException
protected void createRelation(org.apache.uima.jcas.JCas jCas, CollectionTextRelation cluster, IdentifiedAnnotation mention, String predictedCategory, Double confidence)
jCas
- - JCas object, needed to create new UIMA typesarg1
- - First argument to relationarg2
- - Second argument to relationpredictedCategory
- - Name of relationpublic Map<RelationExtractorEvaluation.HashableArguments,Double> getMarkablePairScores(org.apache.uima.jcas.JCas jCas)
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.