public class FeatureUtils extends Object
Constructor and Description |
---|
FeatureUtils() |
Modifier and Type | Method and Description |
---|---|
static double |
calculateNormalDistribution(double input,
double sigma)
Calculates not the actual normal distribution N(input|0,sigma) /
N(0|0,sigma)
|
static double |
calculateSyntacticProbability(org.apache.uima.jcas.tcas.Annotation a,
org.apache.uima.jcas.tcas.Annotation b,
double sigma,
int sentenceMalus,
int paragraphMalus,
org.apache.uima.jcas.JCas jcas)
Calculates a probability (between 0 and 1) that models the confidence
that two annotations belong together given their syntactic distance (the
number of words, sentences and paragraphs in between).
|
static double |
calculateSyntacticProbability(org.apache.uima.jcas.tcas.Annotation a,
org.apache.uima.jcas.tcas.Annotation b,
double sigma,
org.apache.uima.jcas.JCas jcas)
See below
|
static String |
cleanWord(String input)
Cleans the given input word for word identity features.
|
static double |
getConfidence(de.unibi.techfak.scie.descriptors.Annotation anno) |
static int |
getDictionaryID(de.unibi.techfak.scie.descriptors.Annotation anno) |
static <X extends org.apache.uima.jcas.tcas.Annotation> |
getDistanceInCoveringClass(Class<X> annotationClass,
org.apache.uima.jcas.JCas jcas,
org.apache.uima.jcas.tcas.Annotation first,
org.apache.uima.jcas.tcas.Annotation snd)
This calculates the distance of two annotations counted in the instance
of the given Class.
|
static ArrayList<String> |
getPOSTags(org.apache.uima.jcas.tcas.Annotation anno,
org.apache.uima.jcas.JCas jcas) |
static double |
getRelativeBegin(org.apache.uima.jcas.tcas.Annotation anno,
org.apache.uima.jcas.JCas jcas) |
static double |
getRelativeDist(org.apache.uima.jcas.tcas.Annotation a,
org.apache.uima.jcas.tcas.Annotation b,
org.apache.uima.jcas.JCas jcas) |
static double |
getRelativeEnd(org.apache.uima.jcas.tcas.Annotation anno,
org.apache.uima.jcas.JCas jcas) |
static double |
getRelativeIndex(int index,
org.apache.uima.jcas.JCas jcas) |
static double |
getRelativeLength(org.apache.uima.jcas.tcas.Annotation anno,
org.apache.uima.jcas.JCas jcas) |
static ArrayList<String> |
getWordsInBetween(org.apache.uima.jcas.tcas.Annotation a,
org.apache.uima.jcas.tcas.Annotation b,
org.apache.uima.jcas.JCas jcas) |
public static double getRelativeIndex(int index, org.apache.uima.jcas.JCas jcas)
public static double getRelativeBegin(org.apache.uima.jcas.tcas.Annotation anno, org.apache.uima.jcas.JCas jcas)
public static double getRelativeEnd(org.apache.uima.jcas.tcas.Annotation anno, org.apache.uima.jcas.JCas jcas)
public static double getRelativeLength(org.apache.uima.jcas.tcas.Annotation anno, org.apache.uima.jcas.JCas jcas)
public static double getRelativeDist(org.apache.uima.jcas.tcas.Annotation a, org.apache.uima.jcas.tcas.Annotation b, org.apache.uima.jcas.JCas jcas)
public static String cleanWord(String input)
input
- the raw word.public static double calculateNormalDistribution(double input, double sigma)
input
- the input for the density function.sigma
- the standard deviation of the normal distributionpublic static double calculateSyntacticProbability(org.apache.uima.jcas.tcas.Annotation a, org.apache.uima.jcas.tcas.Annotation b, double sigma, org.apache.uima.jcas.JCas jcas)
public static double calculateSyntacticProbability(org.apache.uima.jcas.tcas.Annotation a, org.apache.uima.jcas.tcas.Annotation b, double sigma, int sentenceMalus, int paragraphMalus, org.apache.uima.jcas.JCas jcas)
a
- first annotation.b
- second annotation.public static <X extends org.apache.uima.jcas.tcas.Annotation> int getDistanceInCoveringClass(Class<X> annotationClass, org.apache.uima.jcas.JCas jcas, org.apache.uima.jcas.tcas.Annotation first, org.apache.uima.jcas.tcas.Annotation snd)
X
- annotationClass
- jcas
- first
- snd
- public static final double getConfidence(de.unibi.techfak.scie.descriptors.Annotation anno)
public static final int getDictionaryID(de.unibi.techfak.scie.descriptors.Annotation anno)
public static ArrayList<String> getPOSTags(org.apache.uima.jcas.tcas.Annotation anno, org.apache.uima.jcas.JCas jcas)
Copyright © 2014. All rights reserved.