public class EventTimeI2B2RelationAnnotator extends RelationExtractorAnnotator
RelationExtractorAnnotator.IdentifiedAnnotationPair
coin, NO_RELATION_CATEGORY, PARAM_PROBABILITY_OF_KEEPING_A_NEGATIVE_EXAMPLE, probabilityOfKeepingANegativeExample
Constructor and Description |
---|
EventTimeI2B2RelationAnnotator() |
Modifier and Type | Method and Description |
---|---|
static AnalysisEngineDescription |
createDataWriterDescription(java.lang.Class<? extends |
static AnalysisEngineDescription |
createEngineDescription(java.io.File modelDirectory)
Deprecated.
use String path instead of File.
ClearTK will automatically Resolve the String to an InputStream.
This will allow resources to be read within from a jar as well as File.
|
static AnalysisEngineDescription |
createEngineDescription(java.lang.String modelPath) |
protected void |
createRelation(JCas jCas,
IdentifiedAnnotation arg1,
IdentifiedAnnotation arg2,
java.lang.String predictedCategory)
Create a UIMA relation type based on arguments and the relation label.
|
java.util.List<RelationExtractorAnnotator.IdentifiedAnnotationPair> |
getCandidateRelationArgumentPairs(JCas jCas,
Annotation sentence)
Selects the relevant mentions/annotations within a covering annotation for
relation identification/extraction.
|
protected java.lang.Class<? extends Annotation> |
getCoveringClass() |
protected java.util.List<RelationFeaturesExtractor<IdentifiedAnnotation,IdentifiedAnnotation>> |
getFeatureExtractors()
Defines the list of feature extractors used by the classifier.
|
protected java.lang.String |
getRelationCategory(java.util.Map<java.util.List<Annotation>,BinaryTextRelation> relationLookup,
IdentifiedAnnotation arg1,
IdentifiedAnnotation arg2)
Looks up the arguments in the specified lookup table and converts the
relation into a label for classification
|
classify, getRelationClass, initialize, process
public static AnalysisEngineDescription createDataWriterDescription(java.lang.Class<? extends> dataWriterClass, java.io.File outputDirectory, double probabilityOfKeepingANegativeExample) throws ResourceInitializationException
ResourceInitializationException
public static AnalysisEngineDescription createEngineDescription(java.lang.String modelPath) throws ResourceInitializationException
ResourceInitializationException
@Deprecated public static AnalysisEngineDescription createEngineDescription(java.io.File modelDirectory) throws ResourceInitializationException
ResourceInitializationException
protected java.util.List<RelationFeaturesExtractor<IdentifiedAnnotation,IdentifiedAnnotation>> getFeatureExtractors()
RelationExtractorAnnotator
getFeatureExtractors
in class RelationExtractorAnnotator
protected java.lang.Class<? extends Annotation> getCoveringClass()
getCoveringClass
in class RelationExtractorAnnotator
public java.util.List<RelationExtractorAnnotator.IdentifiedAnnotationPair> getCandidateRelationArgumentPairs(JCas jCas, Annotation sentence)
RelationExtractorAnnotator
getCandidateRelationArgumentPairs
in class RelationExtractorAnnotator
protected void createRelation(JCas jCas, IdentifiedAnnotation arg1, IdentifiedAnnotation arg2, java.lang.String predictedCategory)
RelationExtractorAnnotator
createRelation
in class RelationExtractorAnnotator
jCas
- - JCas object, needed to create new UIMA typesarg1
- - First argument to relationarg2
- - Second argument to relationpredictedCategory
- - Name of relationprotected java.lang.String getRelationCategory(java.util.Map<java.util.List<Annotation>,BinaryTextRelation> relationLookup, IdentifiedAnnotation arg1, IdentifiedAnnotation arg2)
RelationExtractorAnnotator
getRelationCategory
in class RelationExtractorAnnotator