Class LogTfIdfTermWeighting

java.lang.Object
org.carrot2.attrs.AttrComposite
org.carrot2.text.vsm.LogTfIdfTermWeighting
All Implemented Interfaces:
AcceptingVisitor, TermWeighting

public class LogTfIdfTermWeighting extends AttrComposite implements TermWeighting
Calculates term-document matrix element values based on Log Inverse Term Frequency.
  • Constructor Details

    • LogTfIdfTermWeighting

      public LogTfIdfTermWeighting()
  • Method Details

    • calculateTermWeight

      public double calculateTermWeight(int termFrequency, int documentFrequency, int documentCount)
      Description copied from interface: TermWeighting
      Calculates the weight of a term for a single document.
      Specified by:
      calculateTermWeight in interface TermWeighting
      Parameters:
      termFrequency - frequency of the term in the document
      documentFrequency - the number of documents containing the term
      documentCount - total number of documents