Package org.aksw.palmetto.prob
Class AbstractProbabilitySupplier
- java.lang.Object
-
- org.aksw.palmetto.prob.AbstractProbabilitySupplier
-
- All Implemented Interfaces:
ProbabilityEstimator
- Direct Known Subclasses:
BooleanDocumentProbabilitySupplier,WindowBasedProbabilityEstimator
public abstract class AbstractProbabilitySupplier extends Object implements ProbabilityEstimator
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_MIN_FREQUENCYprotected FrequencyDeterminerfreqDeterminerprotected intminFrequency
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractProbabilitySupplier(FrequencyDeterminer freqDeterminer)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description FrequencyDeterminergetFrequencyDeterminer()Returns the frequency determiner used by this estimator.intgetMinFrequency()SubsetProbabilities[]getProbabilities(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, wait
-
Methods inherited from interface org.aksw.palmetto.prob.ProbabilityEstimator
getName
-
-
-
-
Field Detail
-
DEFAULT_MIN_FREQUENCY
public static final int DEFAULT_MIN_FREQUENCY
- See Also:
- Constant Field Values
-
freqDeterminer
protected FrequencyDeterminer freqDeterminer
-
minFrequency
protected int minFrequency
-
-
Constructor Detail
-
AbstractProbabilitySupplier
protected AbstractProbabilitySupplier(FrequencyDeterminer freqDeterminer)
-
-
Method Detail
-
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
protected abstract SubsetProbabilities getProbabilities(CountedSubsets countedSubsets)
-
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
public FrequencyDeterminer 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
public void setFrequencyDeterminer(FrequencyDeterminer freqDeterminer)
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
-
-