public abstract class Web1TProviderBase extends FrequencyCountProviderBase
Modifier and Type | Field and Description |
---|---|
protected String |
basePath |
static String |
BOS |
static String |
EOS |
protected String |
language |
protected com.googlecode.jweb1t.Searcher |
searcher |
Constructor and Description |
---|
Web1TProviderBase() |
Modifier and Type | Method and Description |
---|---|
protected long |
getFrequencyFromProvider(String phrase) |
String |
getLanguage()
Returns the language for which the frequencies are provided.
|
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() |
getFrequency, getID, getLogLikelihood, getLogProbability, getProbability, getScaleDownFactor, setScaleDownFactor
public static final String BOS
public static final String EOS
protected com.googlecode.jweb1t.Searcher searcher
protected String basePath
protected String language
public long getNrOfNgrams(int n)
FrequencyCountProvider
n
- the ngram size.public long getNrOfTokens()
public long getNrOfDistinctNgrams(int n)
FrequencyCountProvider
n
- the ngram size.protected long getFrequencyFromProvider(String phrase) throws IOException
getFrequencyFromProvider
in class FrequencyCountProviderBase
IOException
public Iterator<String> getNgramIterator(int n) throws IOException
FrequencyCountProvider
n
- the ngram size.IOException
- if the information cannot be retrieved.public String getLanguage()
FrequencyCountProvider
Copyright © 2007–2018 Ubiquitous Knowledge Processing (UKP) Lab, Technische Universität Darmstadt. All rights reserved.