/** * @param id - the id of the term in question * @return number of occurrences of a term in a corpus. If a term cannot be found it always * returns 1. */ public int getTermFreq(int id) { int freq = _termFreq.getTermFreq(id); return freq == 0 ? 1 : freq; }
public Set<String> getTerms() { return _termFreq.getGlobalResourceIndex().getTermsCanonical(); }
/** * @param term * @return number of occurrences of a term in a corpus. If a term cannot be found it always * returns 1. */ public int getTermFreq(String term) { int freq = _termFreq.getTermFreq(term); return freq == 0 ? 1 : freq; }