Package org.aksw.palmetto.prob
Class AbstractProbabilitySupplier
java.lang.Object
org.aksw.palmetto.prob.AbstractProbabilitySupplier
- All Implemented Interfaces:
ProbabilityEstimator
- Direct Known Subclasses:
BooleanDocumentProbabilitySupplier,WindowBasedProbabilityEstimator
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractProbabilitySupplier(FrequencyDeterminer freqDeterminer) -
Method Summary
Modifier and TypeMethodDescriptionReturns the frequency determiner used by this estimator.intgetProbabilities(String[][] wordsets, SegmentationDefinition[] definitions)Estimates the probabilities for the given word sets and the given segmentations.protected abstract SubsetProbabilitiesgetProbabilities(CountedSubsets countedSubsets)voidsetFrequencyDeterminer(FrequencyDeterminer freqDeterminer)Sets the frequency determiner that should be used by this estimator.voidsetMinFrequency(int minFrequency)Sets the minimum frequency a word (or word set) must have to get a probability > 0.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aksw.palmetto.prob.ProbabilityEstimator
getName
-
Field Details
-
DEFAULT_MIN_FREQUENCY
public static final int DEFAULT_MIN_FREQUENCY- See Also:
- Constant Field Values
-
freqDeterminer
-
minFrequency
protected int minFrequency
-
-
Constructor Details
-
AbstractProbabilitySupplier
-
-
Method Details
-
getProbabilities
public SubsetProbabilities[] getProbabilities(String[][] wordsets, SegmentationDefinition[] definitions)Description copied from interface:ProbabilityEstimatorEstimates the probabilities for the given word sets and the given segmentations.- Specified by:
getProbabilitiesin interfaceProbabilityEstimator- Parameters:
wordsets- word sets for which the probabilities should be estimateddefinitions- definitions how the word sets should be separated- Returns:
- the subset probabilities for the single word sets
-
getProbabilities
-
setMinFrequency
public void setMinFrequency(int minFrequency)Description copied from interface:ProbabilityEstimatorSets the minimum frequency a word (or word set) must have to get a probability > 0.- Specified by:
setMinFrequencyin interfaceProbabilityEstimator- Parameters:
minFrequency- the minimum frequency of a word
-
getMinFrequency
public int getMinFrequency() -
getFrequencyDeterminer
Description copied from interface:ProbabilityEstimatorReturns the frequency determiner used by this estimator.- Specified by:
getFrequencyDeterminerin interfaceProbabilityEstimator- Returns:
- the frequency determiner used by this estimator
-
setFrequencyDeterminer
Description copied from interface:ProbabilityEstimatorSets the frequency determiner that should be used by this estimator.- Specified by:
setFrequencyDeterminerin interfaceProbabilityEstimator- Parameters:
freqDeterminer- the frequency determiner used by this estimator
-