uk.ac.shef.dcs.oak.jate.core.algorithm
Class WeirdnessFeatureWrapper

java.lang.Object
  extended by uk.ac.shef.dcs.oak.jate.core.algorithm.AbstractFeatureWrapper
      extended by 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.


Constructor Summary
WeirdnessFeatureWrapper(FeatureCorpusTermFrequency wordFreq, FeatureCorpusTermFrequency termFreq, FeatureRefCorpusTermFrequency refWordFreq)
           
 
Method Summary
 double getRefWordFreqNorm(java.lang.String word)
           
 java.util.Set<java.lang.String> getTerms()
           
 int getTotalCorpusWordFreq()
           
 int getWordFreq(java.lang.String word)
           
 
Methods inherited from class uk.ac.shef.dcs.oak.jate.core.algorithm.AbstractFeatureWrapper
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WeirdnessFeatureWrapper

public WeirdnessFeatureWrapper(FeatureCorpusTermFrequency wordFreq,
                               FeatureCorpusTermFrequency termFreq,
                               FeatureRefCorpusTermFrequency refWordFreq)
Method Detail

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