uk.ac.shef.dcs.oak.jate.core.algorithm
Class CValueFeatureWrapper
java.lang.Object
uk.ac.shef.dcs.oak.jate.core.algorithm.AbstractFeatureWrapper
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CValueFeatureWrapper
public CValueFeatureWrapper(FeatureCorpusTermFrequency termFreq,
FeatureTermNest termNest)
- Creates an instance. CValueFeatureWrapper wraps an instance of FeatureCorpusTermFrequency and an instance of FeatureTermNest
- Parameters:
termFreq
- termNest
-
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