public class TokenFeaturesExtractor extends java.lang.Object implements RelationFeaturesExtractor<IdentifiedAnnotation,IdentifiedAnnotation>
Modifier and Type | Field and Description |
---|---|
private FeatureExtractor1 |
coveredText |
private FeatureExtractor1 |
mention1FeaturesExtractor
All extractors for mention 1, with features named to distinguish them from mention 2
|
private FeatureExtractor1 |
mention2FeaturesExtractor
All extractors for mention 2, with features named to distinguish them from mention 1
|
private DistanceExtractor |
nTokensBetween
Number of words between the mentions
|
private FeatureExtractor1 |
tokenContext
First word of the mention, last word of the mention, all words of the mention as a bag, the
preceding 3 words, the following 3 words
|
private CleartkExtractor |
tokensBetween
First word, last word, and all words between the mentions
|
Constructor and Description |
---|
TokenFeaturesExtractor() |
Modifier and Type | Method and Description |
---|---|
java.util.List<Feature> |
extract(JCas jCas,
IdentifiedAnnotation mention1,
IdentifiedAnnotation mention2)
Extract features for the pair of named entity mentions.
|
private static TreebankNode |
getExpandedEvent(JCas jCas,
IdentifiedAnnotation mention) |
private FeatureExtractor1 coveredText
private FeatureExtractor1 tokenContext
private FeatureExtractor1 mention1FeaturesExtractor
private FeatureExtractor1 mention2FeaturesExtractor
private CleartkExtractor tokensBetween
private DistanceExtractor nTokensBetween
public java.util.List<Feature> extract(JCas jCas, IdentifiedAnnotation mention1, IdentifiedAnnotation mention2) throws AnalysisEngineProcessException
RelationFeaturesExtractor
extract
in interface RelationFeaturesExtractor<IdentifiedAnnotation,IdentifiedAnnotation>
jCas
- The JCas containing the two named entity mentions.mention1
- The first identified annotation in the text.mention2
- The second identified annotation in the text.AnalysisEngineProcessException
private static TreebankNode getExpandedEvent(JCas jCas, IdentifiedAnnotation mention)