public abstract class FrequencyCountProviderBase extends Object implements FrequencyCountProvider
Constructor and Description |
---|
FrequencyCountProviderBase() |
Modifier and Type | Method and Description |
---|---|
long |
getFrequency(String phrase)
Get frequency for a phrase
|
protected abstract long |
getFrequencyFromProvider(String phrase) |
String |
getID()
Returns an ID that identifies the frequency provider
|
double |
getLogLikelihood(int termFrequency,
int sizeOfCorpus,
String term) |
double |
getLogProbability(String phrase)
Get the log probability for a phrase
|
double |
getProbability(String phrase)
Get the probability (=normalized frequency) for a phrase.
The frequency count is normalized by the number of phrases in the corpus. |
int |
getScaleDownFactor() |
void |
setScaleDownFactor(int scaleDownFactor) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLanguage, getNgramIterator, getNrOfDistinctNgrams, getNrOfNgrams, getNrOfTokens
public double getProbability(String phrase) throws IOException
FrequencyCountProvider
getProbability
in interface FrequencyCountProvider
phrase
- phrase to searchIOException
- if the information cannot be retrieved.public double getLogProbability(String phrase) throws IOException
FrequencyCountProvider
getLogProbability
in interface FrequencyCountProvider
phrase
- phrase to searchIOException
- if the information cannot be retrieved.public long getFrequency(String phrase) throws IOException
FrequencyCountProvider
getFrequency
in interface FrequencyCountProvider
phrase
- phrase to searchIOException
- if the information cannot be retrieved.protected abstract long getFrequencyFromProvider(String phrase) throws IOException
IOException
public double getLogLikelihood(int termFrequency, int sizeOfCorpus, String term) throws IOException
IOException
public int getScaleDownFactor()
public void setScaleDownFactor(int scaleDownFactor)
public String getID() throws IllegalArgumentException
FrequencyCountProvider
getID
in interface FrequencyCountProvider
IllegalArgumentException
Copyright © 2007–2018 Ubiquitous Knowledge Processing (UKP) Lab, Technische Universität Darmstadt. All rights reserved.