public class UIMAAnnotationCompositionUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
UIMAAnnotationCompositionUtil.UIMAAnnotationCandidate<X extends org.apache.uima.jcas.tcas.Annotation> |
static class |
UIMAAnnotationCompositionUtil.UIMASemanticProbabilityModel<X extends org.apache.uima.jcas.tcas.Annotation> |
Constructor and Description |
---|
UIMAAnnotationCompositionUtil() |
Modifier and Type | Method and Description |
---|---|
static <Y extends org.apache.uima.jcas.tcas.Annotation> |
calculateComposita(org.apache.uima.jcas.tcas.Annotation core,
SyntacticProbabilityModel syntacticModel,
UIMAAnnotationCompositionUtil.UIMASemanticProbabilityModel[] semanticModels,
Class[] slotClasses,
UIMACompositor<Y> compositor,
org.apache.uima.jcas.JCas jcas)
This calculates all composita that are possible to create given a certain core annotation and
a list of candidates for each slots of the compositum.
|
static <Y extends org.apache.uima.jcas.tcas.Annotation> |
calculateComposita(org.apache.uima.jcas.tcas.Annotation core,
UIMAAnnotationCompositionUtil.UIMASemanticProbabilityModel[] semanticModels,
Class[] slotClasses,
UIMACompositor<Y> compositor,
org.apache.uima.jcas.JCas jcas,
double syntacticSigma)
This calculates all composita that are possible to create given a certain core annotation and
a list of candidates for each slots of the compositum.
|
static <X extends org.apache.uima.jcas.tcas.Annotation> |
calculateMaxProbHypothesis(org.apache.uima.jcas.tcas.Annotation core,
SyntacticProbabilityModel syntacticProbModel,
UIMAAnnotationCompositionUtil.UIMASemanticProbabilityModel<X> semanticProbModel,
Class<? extends X> candidateClass,
org.apache.uima.jcas.JCas jcas)
This calculates the AnnotationCandidate with the maximum probability to belong to some given
core for a composit annotation and returns it with the probability (without normalization!)
|
static <X extends org.apache.uima.jcas.tcas.Annotation> |
calculateMaxProbHypothesis(org.apache.uima.jcas.tcas.Annotation core,
UIMAAnnotationCompositionUtil.UIMASemanticProbabilityModel<X> likelihoodModel,
Class<? extends X> candidateClass,
org.apache.uima.jcas.JCas jcas,
double syntacticSigma)
This calculates the AnnotationCandidate with the maximum probability to belong to some given
core for a composit annotation and returns it with the probability (without normalization!)
|
static <X extends org.apache.uima.jcas.tcas.Annotation> |
calculateProbableHypotheses(org.apache.uima.jcas.tcas.Annotation core,
SyntacticProbabilityModel syntacticModel,
UIMAAnnotationCompositionUtil.UIMASemanticProbabilityModel<X> semanticModel,
Class<? extends X> candidateClass,
org.apache.uima.jcas.JCas jcas,
double syntacticSigma)
For any of the given candidates the probability is calculated, that this candidate belongs to
the given core annotation.
|
static <X extends org.apache.uima.jcas.tcas.Annotation> |
calculateProbableHypotheses(org.apache.uima.jcas.tcas.Annotation core,
UIMAAnnotationCompositionUtil.UIMASemanticProbabilityModel<X> semanticModel,
Class<? extends X> candidateClass,
org.apache.uima.jcas.JCas jcas,
double syntacticSigma)
For any of the given candidates the probability is calculated, that this candidate belongs to
the given core annotation.
|
static <X extends org.apache.uima.jcas.tcas.Annotation> |
wrap(Collection<? extends X> annotations) |
public static <X extends org.apache.uima.jcas.tcas.Annotation> ProbableHypothesis<UIMAAnnotationCompositionUtil.UIMAAnnotationCandidate<X>> calculateMaxProbHypothesis(org.apache.uima.jcas.tcas.Annotation core, UIMAAnnotationCompositionUtil.UIMASemanticProbabilityModel<X> likelihoodModel, Class<? extends X> candidateClass, org.apache.uima.jcas.JCas jcas, double syntacticSigma)
core
- the core annotation for a bigger Annotation Compositon.semanticProbModel
- a model that is able to calculate the probability of two annotation
candidates belonging together.candidateClass
- the class of the candidate.jcas
- the current JCas objectsyntacticSigma
- this influences how the syntactic probability is calculated. For an
in-depth documentation have a look at the calculateSyntacticProbability-method.public static <X extends org.apache.uima.jcas.tcas.Annotation> ProbableHypothesis<UIMAAnnotationCompositionUtil.UIMAAnnotationCandidate<X>> calculateMaxProbHypothesis(org.apache.uima.jcas.tcas.Annotation core, SyntacticProbabilityModel syntacticProbModel, UIMAAnnotationCompositionUtil.UIMASemanticProbabilityModel<X> semanticProbModel, Class<? extends X> candidateClass, org.apache.uima.jcas.JCas jcas)
core
- the core annotation for a bigger Annotation Compositon.syntacticProbModel
- a model that is able to calculate the probabiliy of two
AnnotationCandidates belonging together from a syntactic perspective.semanticProbModel
- a model that is able to calculate the probability of two annotation
candidates belonging together from a semantic perspective.candidateClass
- the class of the candidate.jcas
- the current JCas objectpublic static <X extends org.apache.uima.jcas.tcas.Annotation> ArrayList<ProbableHypothesis<UIMAAnnotationCompositionUtil.UIMAAnnotationCandidate<X>>> calculateProbableHypotheses(org.apache.uima.jcas.tcas.Annotation core, UIMAAnnotationCompositionUtil.UIMASemanticProbabilityModel<X> semanticModel, Class<? extends X> candidateClass, org.apache.uima.jcas.JCas jcas, double syntacticSigma)
core
- the core annotation for a bigger Annotation Compositon.semanticProbModel
- a model that is able to calculate the probability of two annotation
candidates belonging together.candidateClass
- the class of the candidate.jcas
- the current JCas objectsyntacticSigma
- this influences how the syntactic probability is calculated. For an
in-depth documentation have a look at the calculateSyntacticProbability-method.public static <X extends org.apache.uima.jcas.tcas.Annotation> ArrayList<ProbableHypothesis<UIMAAnnotationCompositionUtil.UIMAAnnotationCandidate<X>>> calculateProbableHypotheses(org.apache.uima.jcas.tcas.Annotation core, SyntacticProbabilityModel syntacticModel, UIMAAnnotationCompositionUtil.UIMASemanticProbabilityModel<X> semanticModel, Class<? extends X> candidateClass, org.apache.uima.jcas.JCas jcas, double syntacticSigma)
core
- the core annotation for a bigger Annotation Compositon.syntacticModel
- a model that is able to calculate the probabiliy of two
AnnotationCandidates belonging together from a syntactic perspective.semanticProbModel
- a model that is able to calculate the probability of two annotation
candidates belonging together.candidateClass
- the class of the candidate.jcas
- the current JCas objectsyntacticSigma
- this influences how the syntactic probability is calculated. For an
in-depth documentation have a look at the calculateSyntacticProbability-method.public static <Y extends org.apache.uima.jcas.tcas.Annotation> List<Y> calculateComposita(org.apache.uima.jcas.tcas.Annotation core, UIMAAnnotationCompositionUtil.UIMASemanticProbabilityModel[] semanticModels, Class[] slotClasses, UIMACompositor<Y> compositor, org.apache.uima.jcas.JCas jcas, double syntacticSigma)
class CompositumClass {
CoreClass core;
Slot1Class slot1Instance;
Slot2Class slot2Instance;
...
}
The user is required to provide a SemanticProbabilityModel and a collection of a priori
candidates for each slot.
Also she is required to construct a class that is able to actually create the compositum from
one candidate for each slot.
This uses the CharBasedSyntacticProbabilityModel per default.core
- the core annotation that shall be the center of the new compositum.semanticModels
- An array of SemanticProbabilityModels, one for each slot.slotClasses
- An Array of classes, one for each slot.compositor
- An AnnotationCompositor instance to construct the resulting composita from
all possible hypothesis combinations.jcas
- the current JCas instance.syntacticSigma
- this influences how the syntactic probability is calculated. For an
in-depth documentation have a look at the calculateSyntacticProbability-method.public static <Y extends org.apache.uima.jcas.tcas.Annotation> List<Y> calculateComposita(org.apache.uima.jcas.tcas.Annotation core, SyntacticProbabilityModel syntacticModel, UIMAAnnotationCompositionUtil.UIMASemanticProbabilityModel[] semanticModels, Class[] slotClasses, UIMACompositor<Y> compositor, org.apache.uima.jcas.JCas jcas)
class CompositumClass {
CoreClass core;
Slot1Class slot1Instance;
Slot2Class slot2Instance;
...
}
The user is required to provide a SemanticProbabilityModel and a collection of a priori
candidates for each slot.
Also she is required to construct a class that is able to actually create the compositum from
one candidate for each slot.core
- the core annotation that shall be the center of the new compositum.syntacticModel
- a model that is able to calculate the probabiliy of two
AnnotationCandidates belonging together from a syntactic perspective.semanticModels
- An array of SemanticProbabilityModels, one for each slot.slotClasses
- An Array of classes, one for each slot.compositor
- An AnnotationCompositor instance to construct the resulting composita from
all possible hypothesis combinations.jcas
- the current JCas instance.public static <X extends org.apache.uima.jcas.tcas.Annotation> ArrayList<UIMAAnnotationCompositionUtil.UIMAAnnotationCandidate<X>> wrap(Collection<? extends X> annotations)
Copyright (C) 2013, 2014 Raphael Dickfelder, Jan Göpfert, Benjamin Paassen, Andreas Stöckel, licensed under the AGPL v. 3: http://openresearch.cit-ec.de/projects/scie