Class AxiomaticF1LOG
- java.lang.Object
-
- org.apache.lucene.search.similarities.Similarity
-
- org.apache.lucene.search.similarities.SimilarityBase
-
- org.apache.lucene.search.similarities.Axiomatic
-
- org.apache.lucene.search.similarities.AxiomaticF1LOG
-
public class AxiomaticF1LOG extends Axiomatic
F1LOG is defined as Sum(tf(term_doc_freq)*ln(docLen)*IDF(term)) where IDF(t) = ln((N+1)/df(t)) N=total num of docs, df=doc freq- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.search.similarities.Similarity
Similarity.SimScorer
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.search.similarities.SimilarityBase
discountOverlaps
-
-
Constructor Summary
Constructors Constructor Description AxiomaticF1LOG()
Default constructorAxiomaticF1LOG(float s)
Constructor setting s only, letting k and queryLen to default
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected double
gamma(BasicStats stats, double freq, double docLen)
compute the gamma componentprotected double
idf(BasicStats stats, double freq, double docLen)
compute the inverted document frequency componentprotected Explanation
idfExplain(BasicStats stats, double freq, double docLen)
Explain the score of the inverted document frequency component for a single documentprotected double
ln(BasicStats stats, double freq, double docLen)
compute the document length componentprotected Explanation
lnExplain(BasicStats stats, double freq, double docLen)
Explain the score of the document length component for a single documentprotected double
tf(BasicStats stats, double freq, double docLen)
compute the term frequency componentprotected Explanation
tfExplain(BasicStats stats, double freq, double docLen)
Explain the score of the term frequency component for a single documentprotected double
tfln(BasicStats stats, double freq, double docLen)
compute the mixed term frequency and document length componentprotected Explanation
tflnExplain(BasicStats stats, double freq, double docLen)
Explain the score of the mixed term frequency and document length component for a single documentString
toString()
Name of the axiomatic method.-
Methods inherited from class org.apache.lucene.search.similarities.Axiomatic
explain, explain, score
-
Methods inherited from class org.apache.lucene.search.similarities.SimilarityBase
computeNorm, fillBasicStats, getDiscountOverlaps, log2, newStats, scorer, setDiscountOverlaps
-
-
-
-
Method Detail
-
toString
public String toString()
Description copied from class:Axiomatic
Name of the axiomatic method.
-
tf
protected double tf(BasicStats stats, double freq, double docLen)
compute the term frequency component
-
ln
protected double ln(BasicStats stats, double freq, double docLen)
compute the document length component
-
tfln
protected double tfln(BasicStats stats, double freq, double docLen)
compute the mixed term frequency and document length component
-
idf
protected double idf(BasicStats stats, double freq, double docLen)
compute the inverted document frequency component
-
gamma
protected double gamma(BasicStats stats, double freq, double docLen)
compute the gamma component
-
tfExplain
protected Explanation tfExplain(BasicStats stats, double freq, double docLen)
Description copied from class:Axiomatic
Explain the score of the term frequency component for a single document
-
lnExplain
protected Explanation lnExplain(BasicStats stats, double freq, double docLen)
Description copied from class:Axiomatic
Explain the score of the document length component for a single document
-
tflnExplain
protected Explanation tflnExplain(BasicStats stats, double freq, double docLen)
Description copied from class:Axiomatic
Explain the score of the mixed term frequency and document length component for a single document- Specified by:
tflnExplain
in classAxiomatic
- Parameters:
stats
- the corpus level statisticsfreq
- number of occurrences of term in the documentdocLen
- the document length- Returns:
- Explanation of how the tfln component was computed
-
idfExplain
protected Explanation idfExplain(BasicStats stats, double freq, double docLen)
Description copied from class:Axiomatic
Explain the score of the inverted document frequency component for a single document- Specified by:
idfExplain
in classAxiomatic
- Parameters:
stats
- the corpus level statisticsfreq
- number of occurrences of term in the documentdocLen
- the document length- Returns:
- Explanation of how the idf component was computed
-
-