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
Modifier and Type Method Description double
calculateTermWeight(int termFrequency, int documentFrequency, int documentCount)
Calculates the weight of a term for a single document.
-
Method Details
-
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
-