org.carrot2.text.vsm
Class TfTermWeighting

java.lang.Object
  extended by org.carrot2.text.vsm.TfTermWeighting
All Implemented Interfaces:
ITermWeighting

public class TfTermWeighting
extends Object
implements ITermWeighting

Calculates term-document matrix element values based on Log Inverse Term Frequency.


Constructor Summary
TfTermWeighting()
           
 
Method Summary
 double calculateTermWeight(int termFrequency, int documentFrequency, int documentCount)
          Calculates the weight of a term for a single document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TfTermWeighting

public TfTermWeighting()
Method Detail

calculateTermWeight

public double calculateTermWeight(int termFrequency,
                                  int documentFrequency,
                                  int documentCount)
Description copied from interface: ITermWeighting
Calculates the weight of a term for a single document.

Specified by:
calculateTermWeight in interface ITermWeighting
Parameters:
termFrequency - frequency of the term in the document
documentFrequency - the number of documents containing the term
documentCount - total number of documents


Copyright (c) Dawid Weiss, Stanislaw Osinski