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

java.lang.Object
  extended by uk.ac.shef.dcs.oak.jate.core.algorithm.AbstractFeatureWrapper
      extended by uk.ac.shef.dcs.oak.jate.core.algorithm.CValueFeatureWrapper

public class CValueFeatureWrapper
extends AbstractFeatureWrapper

CValueFeatureWrapper wraps an instance of FeatureCorpusTermFrequency, which tells a term's distribution over a corpus; and an instance of FeatureTermNest, which tells term-nested-in-term relations


Constructor Summary
CValueFeatureWrapper(FeatureCorpusTermFrequency termFreq, FeatureTermNest termNest)
          Creates an instance.
 
Method Summary
 int[] getNestsOf(java.lang.String nested)
           
 int getTermFreq(int id)
           
 int getTermFreq(java.lang.String term)
           
 java.util.Set<java.lang.String> getTerms()
           
 
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

CValueFeatureWrapper

public CValueFeatureWrapper(FeatureCorpusTermFrequency termFreq,
                            FeatureTermNest termNest)
Creates an instance. CValueFeatureWrapper wraps an instance of FeatureCorpusTermFrequency and an instance of FeatureTermNest

Parameters:
termFreq -
termNest -
Method Detail

getTermFreq

public int getTermFreq(java.lang.String term)
Parameters:
term -
Returns:
number of occurrences of a term in a corpus. If a term cannot be found it always returns 1.

getTermFreq

public int getTermFreq(int id)
Parameters:
id - - the id of the term in question
Returns:
number of occurrences of a term in a corpus. If a term cannot be found it always returns 1.

getNestsOf

public int[] getNestsOf(java.lang.String nested)
Parameters:
nested -
Returns:
ids of terms in which the provided term nests in

getTerms

public java.util.Set<java.lang.String> getTerms()
Specified by:
getTerms in class AbstractFeatureWrapper
Returns:
set of candidate term strings