uk.ac.shef.dcs.oak.jate.core.algorithm
Class WeirdnessFeatureWrapper
java.lang.Object
uk.ac.shef.dcs.oak.jate.core.algorithm.AbstractFeatureWrapper
uk.ac.shef.dcs.oak.jate.core.algorithm.WeirdnessFeatureWrapper
public class WeirdnessFeatureWrapper
- extends AbstractFeatureWrapper
WeirdnessFeatureWrapper wraps an instance of FeatureCorpusTermFrequency, which tells a candidate term's distribution over a corpus;
another instance of FeatureCorpusTermFrequency which tells individual words' distributions over corpus;
and an instance of FeatureRefCorpusTermFrequency, which tells individual words' distributions in a reference corpus.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
WeirdnessFeatureWrapper
public WeirdnessFeatureWrapper(FeatureCorpusTermFrequency wordFreq,
FeatureCorpusTermFrequency termFreq,
FeatureRefCorpusTermFrequency refWordFreq)
getTotalCorpusWordFreq
public int getTotalCorpusWordFreq()
- Returns:
- total number of words in the corpus
getWordFreq
public int getWordFreq(java.lang.String word)
- Parameters:
word
-
- Returns:
- the number of occurrences of a word in the corpus
getRefWordFreqNorm
public double getRefWordFreqNorm(java.lang.String word)
- Parameters:
word
-
- Returns:
- the normalised frequency of a word in the reference corpus. It is equal to freq of word w divided by
total frequencies
getTerms
public java.util.Set<java.lang.String> getTerms()
- Specified by:
getTerms
in class AbstractFeatureWrapper
- Returns:
- set of candidate term strings