Class DependencySimilarity
- java.lang.Object
-
- org.apache.lucene.search.similarities.Similarity
-
- org.apache.lucene.search.similarities.TFIDFSimilarity
-
- org.apache.lucene.search.similarities.ClassicSimilarity
-
- org.owasp.dependencycheck.data.lucene.DependencySimilarity
-
@NotThreadSafe public class DependencySimilarity extends org.apache.lucene.search.similarities.ClassicSimilarity
- Author:
- Jeremy Long
-
-
Constructor Summary
Constructors Constructor Description DependencySimilarity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
idf(long docFreq, long numDocs)
Override the default IDF implementation so that frequency within all document is ignored.-
Methods inherited from class org.apache.lucene.search.similarities.ClassicSimilarity
idfExplain, lengthNorm, tf, toString
-
Methods inherited from class org.apache.lucene.search.similarities.TFIDFSimilarity
idfExplain, scorer
-
-
-
-
Method Detail
-
idf
public float idf(long docFreq, long numDocs)
Override the default IDF implementation so that frequency within all document is ignored.
See this article for more details.- Overrides:
idf
in classorg.apache.lucene.search.similarities.ClassicSimilarity
- Parameters:
docFreq
- - the number of documents which contain the termnumDocs
- - the total number of documents in the collection- Returns:
- 1
-
-