public interface FrequencyCountProvider
Modifier and Type | Method and Description |
---|---|
long |
getFrequency(String phrase)
Get frequency for a phrase
|
String |
getID()
Returns an ID that identifies the frequency provider
|
String |
getLanguage()
Returns the language for which the frequencies are provided.
|
double |
getLogProbability(String phrase)
Get the log probability for a phrase
|
Iterator<String> |
getNgramIterator(int n)
Returns an iterator over all ngrams of a given size in the corpus.
|
long |
getNrOfDistinctNgrams(int n)
Returns the number of distinct ngrams of a given size in the corpus.
|
long |
getNrOfNgrams(int n)
Returns the number of ngrams of a given size in the corpus.
|
long |
getNrOfTokens() |
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. |
long getFrequency(String phrase) throws IOException
phrase
- phrase to searchIOException
- if the information cannot be retrieved.double getProbability(String phrase) throws IOException
phrase
- phrase to searchIOException
- if the information cannot be retrieved.double getLogProbability(String phrase) throws IOException
phrase
- phrase to searchIOException
- if the information cannot be retrieved.long getNrOfTokens() throws IOException
IOException
- if the information cannot be retrieved.long getNrOfNgrams(int n) throws IOException
n
- the ngram size.IOException
- if the information cannot be retrieved.long getNrOfDistinctNgrams(int n) throws IOException
n
- the ngram size.IOException
- if the information cannot be retrieved.Iterator<String> getNgramIterator(int n) throws IOException
n
- the ngram size.IOException
- if the information cannot be retrieved.String getLanguage() throws IOException
IOException
- if the information cannot be retrieved.String getID()
Copyright © 2007–2018 Ubiquitous Knowledge Processing (UKP) Lab, Technische Universität Darmstadt. All rights reserved.