public class Utils extends Object
Constructor and Description |
---|
Utils() |
Modifier and Type | Method and Description |
---|---|
static int |
getDistance(org.apache.uima.jcas.JCas jCas,
RelationExtractorAnnotator.IdentifiedAnnotationPair pair)
Calculate the distance (in tokens) between two identified annotations.
|
static List<TreebankNode> |
getNounPhrases(org.apache.uima.jcas.JCas identifiedAnnotationView,
Sentence sentence)
Get all noun phrases in a sentence.
|
static boolean |
isEnclosed(RelationExtractorAnnotator.IdentifiedAnnotationPair pair,
TreebankNode np)
Is this pair of entities enclosed inside a noun phrase?
|
static boolean |
validateDegreeOfArgumentTypes(RelationExtractorAnnotator.IdentifiedAnnotationPair pair)
Are entity types of the arguments valid for degree_of relation?
The following are the valid combinations:
degree-of(disease/disorder/2, modifier)
degree-of(sign/symptom/3, modifier)
|
static boolean |
validateLocationOfArgumentTypes(RelationExtractorAnnotator.IdentifiedAnnotationPair pair)
Are entity types of the arguments valid for location_of relation?
The following combinations are allowed:
location-of(anatomical site/6, disorder/2)
location-of(anatomical site/6, sign/symptom/3)
location-of(anatomical site/6, procedure/5)
|
public static boolean validateLocationOfArgumentTypes(RelationExtractorAnnotator.IdentifiedAnnotationPair pair)
public static boolean validateDegreeOfArgumentTypes(RelationExtractorAnnotator.IdentifiedAnnotationPair pair)
public static int getDistance(org.apache.uima.jcas.JCas jCas, RelationExtractorAnnotator.IdentifiedAnnotationPair pair)
public static boolean isEnclosed(RelationExtractorAnnotator.IdentifiedAnnotationPair pair, TreebankNode np)
public static List<TreebankNode> getNounPhrases(org.apache.uima.jcas.JCas identifiedAnnotationView, Sentence sentence)
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.