@PipeBitInfo(name="Coreference (Cluster Rank)", description="Coreference annotator using mention-synchronous paradigm.", dependencies={BASE_TOKEN,SENTENCE,SECTION,PARAGRAPH,IDENTIFIED_ANNOTATION,MARKABLE}, products=COREFERENCE_RELATION) public class MentionClusterRankingCoreferenceAnnotator extends org.cleartk.ml.CleartkAnnotator<Double>
Modifier and Type | Class and Description |
---|---|
static class |
MentionClusterRankingCoreferenceAnnotator.CollectionTextRelationIdentifiedAnnotationPair |
Modifier and Type | Field and Description |
---|---|
static String |
CLUSTER_RELATION_CATEGORY |
protected Random |
coin |
static String |
NO_RELATION_CATEGORY |
static String |
PARAM_PROBABILITY_OF_KEEPING_A_NEGATIVE_EXAMPLE |
protected double |
probabilityOfKeepingANegativeExample |
Constructor and Description |
---|
MentionClusterRankingCoreferenceAnnotator() |
Modifier and Type | Method and Description |
---|---|
protected Double |
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<?>> dataWriterClass,
File outputDirectory,
float downsamplingRate) |
protected void |
createRelation(org.apache.uima.jcas.JCas jCas,
CollectionTextRelation cluster,
IdentifiedAnnotation mention,
String predictedCategory)
Create a UIMA relation type based on arguments and the relation label.
|
Set<String> |
getBestEnt(org.apache.uima.jcas.JCas jcas,
CollectionTextRelation cluster) |
Set<String> |
getBestEnt(org.apache.uima.jcas.JCas jcas,
Markable markable) |
protected Iterable<MentionClusterRankingCoreferenceAnnotator.CollectionTextRelationIdentifiedAnnotationPair> |
getCandidateRelationArgumentPairs(org.apache.uima.jcas.JCas jcas,
IdentifiedAnnotation mention) |
protected List<RelationFeaturesExtractor<CollectionTextRelation,IdentifiedAnnotation>> |
getFeatureExtractors() |
protected List<MentionClusterRankingCoreferenceAnnotator.CollectionTextRelationIdentifiedAnnotationPair> |
getHeadwordMatchPairs(org.apache.uima.jcas.JCas jcas,
IdentifiedAnnotation mention,
int sentDist) |
Map<RelationExtractorEvaluation.HashableArguments,Double> |
getMarkablePairScores(org.apache.uima.jcas.JCas jCas) |
protected List<org.cleartk.ml.feature.extractor.FeatureExtractor1<Markable>> |
getMentionExtractors() |
protected String |
getRelationCategory(Map<MentionClusterRankingCoreferenceAnnotator.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
|
protected List<MentionClusterRankingCoreferenceAnnotator.CollectionTextRelationIdentifiedAnnotationPair> |
getSectionHeaderPairs(org.apache.uima.jcas.JCas jcas,
IdentifiedAnnotation mention,
int sentDist) |
protected List<MentionClusterRankingCoreferenceAnnotator.CollectionTextRelationIdentifiedAnnotationPair> |
getSentenceDistancePairs(org.apache.uima.jcas.JCas jcas,
IdentifiedAnnotation mention,
int sentDist) |
void |
process(org.apache.uima.jcas.JCas jCas) |
collectionProcessComplete, initialize, isTraining
getRequiredCasInterface, process
getCasInstancesRequired, hasNext, next
public static final String NO_RELATION_CATEGORY
public static final String CLUSTER_RELATION_CATEGORY
public static final String PARAM_PROBABILITY_OF_KEEPING_A_NEGATIVE_EXAMPLE
protected double probabilityOfKeepingANegativeExample
protected Random coin
public MentionClusterRankingCoreferenceAnnotator()
public static org.apache.uima.analysis_engine.AnalysisEngineDescription createDataWriterDescription(Class<? extends org.cleartk.ml.DataWriter<?>> 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 Iterable<MentionClusterRankingCoreferenceAnnotator.CollectionTextRelationIdentifiedAnnotationPair> getCandidateRelationArgumentPairs(org.apache.uima.jcas.JCas jcas, IdentifiedAnnotation mention)
protected List<MentionClusterRankingCoreferenceAnnotator.CollectionTextRelationIdentifiedAnnotationPair> getSentenceDistancePairs(org.apache.uima.jcas.JCas jcas, IdentifiedAnnotation mention, int sentDist)
protected List<MentionClusterRankingCoreferenceAnnotator.CollectionTextRelationIdentifiedAnnotationPair> getSectionHeaderPairs(org.apache.uima.jcas.JCas jcas, IdentifiedAnnotation mention, int sentDist)
protected List<MentionClusterRankingCoreferenceAnnotator.CollectionTextRelationIdentifiedAnnotationPair> getHeadwordMatchPairs(org.apache.uima.jcas.JCas jcas, IdentifiedAnnotation mention, int sentDist)
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<MentionClusterRankingCoreferenceAnnotator.CollectionTextRelationIdentifiedAnnotationPair,CollectionTextRelationIdentifiedAnnotationRelation> relationLookup, CollectionTextRelation cluster, IdentifiedAnnotation mention)
protected Double 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)
jCas
- - JCas object, needed to create new UIMA typesarg1
- - First argument to relationarg2
- - Second argument to relationpredictedCategory
- - Name of relationpublic Set<String> getBestEnt(org.apache.uima.jcas.JCas jcas, CollectionTextRelation cluster)
public Map<RelationExtractorEvaluation.HashableArguments,Double> getMarkablePairScores(org.apache.uima.jcas.JCas jCas)
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.