public class AnnotationCompositionUtil extends Object
Constructor and Description |
---|
AnnotationCompositionUtil() |
Modifier and Type | Method and Description |
---|---|
static <Y> List<Y> |
calculateComposita(AnnotationCandidate core,
SemanticProbabilityModel[] semanticModels,
Collection[] candidates,
AnnotationCompositor<Y> compositor,
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 <Y> List<Y> |
calculateComposita(AnnotationCandidate core,
SyntacticProbabilityModel syntacticModel,
SemanticProbabilityModel[] semanticModels,
Collection[] candidates,
AnnotationCompositor<Y> compositor)
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 AnnotationCandidate> |
calculateMaxProbHypothesis(AnnotationCandidate core,
SemanticProbabilityModel<X> semanticProbModel,
Collection<X> candidates,
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 AnnotationCandidate> |
calculateMaxProbHypothesis(AnnotationCandidate core,
SyntacticProbabilityModel syntacticProbModel,
SemanticProbabilityModel<X> semanticProbModel,
Collection<X> candidates)
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 AnnotationCandidate> |
calculateProbableHypotheses(AnnotationCandidate core,
SemanticProbabilityModel<X> semanticProbModel,
Collection<X> candidates,
double syntacticSigma)
For any of the given candidates the probability is calculated, that this
candidate belongs to the given core annotation.
|
static <X extends AnnotationCandidate> |
calculateProbableHypotheses(AnnotationCandidate core,
SyntacticProbabilityModel syntacticProbModel,
SemanticProbabilityModel<X> semanticProbModel,
Collection<X> candidates)
For any of the given candidates the probability is calculated, that this
candidate belongs to the given core annotation.
|
public static <X extends AnnotationCandidate> ProbableHypothesis<X> calculateMaxProbHypothesis(AnnotationCandidate core, SemanticProbabilityModel<X> semanticProbModel, Collection<X> candidates, 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.candidates
- an a priori given list of candidates that might belong
to the core annotation.syntacticSigma
- this influences how the syntactic probability is
calculated. For an in-depth documentation have a look at the
calculateSyntacticProbability-method.public static <X extends AnnotationCandidate> ProbableHypothesis<X> calculateMaxProbHypothesis(AnnotationCandidate core, SyntacticProbabilityModel syntacticProbModel, SemanticProbabilityModel<X> semanticProbModel, Collection<X> candidates)
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.candidates
- an a priori given list of candidates that might belong
to the core annotation.public static <X extends AnnotationCandidate> ArrayList<ProbableHypothesis<X>> calculateProbableHypotheses(AnnotationCandidate core, SemanticProbabilityModel<X> semanticProbModel, Collection<X> candidates, 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.candidates
- an a priori given list of candidates that might belong
to the core annotation.syntacticSigma
- this influences how the syntactic probability is
calculated. For an in-depth documentation have a look at the
calculateSyntacticProbability-method.public static <X extends AnnotationCandidate> ArrayList<ProbableHypothesis<X>> calculateProbableHypotheses(AnnotationCandidate core, SyntacticProbabilityModel syntacticProbModel, SemanticProbabilityModel<X> semanticProbModel, Collection<X> candidates)
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.candidates
- an a priori given list of candidates that might belong
to the core annotation.syntacticSigma
- this influences how the syntactic probability is
calculated. For an in-depth documentation have a look at the
calculateSyntacticProbability-method.public static <Y> List<Y> calculateComposita(AnnotationCandidate core, SemanticProbabilityModel[] semanticModels, Collection[] candidates, AnnotationCompositor<Y> compositor, 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.candidates
- An Array of Candidate-collections, one for each slot in
the same order as the SemanticProbabilityModels.compositor
- An AnnotationCompositor instance to construct the
resulting composita from all possible hypothesis combinations.syntacticSigma
- this influences how the syntactic probability is
calculated. For an in-depth documentation have a look at the
calculateSyntacticProbability-method.public static <Y> List<Y> calculateComposita(AnnotationCandidate core, SyntacticProbabilityModel syntacticModel, SemanticProbabilityModel[] semanticModels, Collection[] candidates, AnnotationCompositor<Y> compositor)
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.candidates
- An Array of Candidate-collections, one for each slot in
the same order as the SemanticProbabilityModels.compositor
- An AnnotationCompositor instance to construct the
resulting composita from all possible hypothesis combinations.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