public class NLPUtils extends Object
| Constructor and Description |
|---|
NLPUtils() |
| Modifier and Type | Method and Description |
|---|---|
static double |
idf(double totalDocumentsInCorpus,
double numberOfDocsTheTermAppearsIn)
Calc the IDF component
|
static double |
tf(int termFreqInSpecificDocuments)
Term frequency
https://en.wikipedia.org/wiki/Tf%E2%80%93idf
|
static double |
tfidf(double tf,
double idf)
Return td * idf
|
public static double idf(double totalDocumentsInCorpus,
double numberOfDocsTheTermAppearsIn)
public static double tf(int termFreqInSpecificDocuments)
public static double tfidf(double tf,
double idf)
tf - the term frequency (assumed calculated)idf - inverse document frequency (assumed calculated)Copyright © 2015. All rights reserved.