Package org.carrot2.text.vsm
Interface TermWeighting
-
- All Superinterfaces:
AcceptingVisitor
- All Known Implementing Classes:
LinearTfIdfTermWeighting
,LogTfIdfTermWeighting
,TfTermWeighting
public interface TermWeighting extends AcceptingVisitor
Calculates term weights for the term-document matrix.- See Also:
TermDocumentMatrixBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
calculateTermWeight(int termFrequency, int documentFrequency, int documentCount)
Calculates the weight of a term for a single document.-
Methods inherited from interface org.carrot2.attrs.AcceptingVisitor
accept
-
-
-
-
Method Detail
-
calculateTermWeight
double calculateTermWeight(int termFrequency, int documentFrequency, int documentCount)
Calculates the weight of a term for a single document.- Parameters:
termFrequency
- frequency of the term in the documentdocumentFrequency
- the number of documents containing the termdocumentCount
- total number of documents
-
-