public class Idf extends BowHeuristic
N
of 1, the idf is ignored and a value of 1.0 is returned. If the term count
t
is 0 (it should not be) then it is set to 1. The value used is Math.log(N/t).termCount, termList
Constructor and Description |
---|
Idf()
Create a new instance of Idf.
|
Modifier and Type | Method and Description |
---|---|
java.util.HashMap<java.lang.String,java.lang.Float> |
calcIDF(java.util.ArrayList<BagOfWords> bowList)
Create the inverse term document frequency for the selected documents.
|
createBoW, createBoW, getTermCount, sortTermOrder, sortTopTermOrder
public java.util.HashMap<java.lang.String,java.lang.Float> calcIDF(java.util.ArrayList<BagOfWords> bowList) throws java.lang.Exception
bowList
- list of bag or words to process.java.lang.Exception
- any error.