Class LinearTfIdfTermWeighting

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

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

    • LinearTfIdfTermWeighting

      public LinearTfIdfTermWeighting()
  • 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