BM25Similarity should be used instead@Deprecated public final class LegacyBM25Similarity extends Similarity
BM25Similarity while also applying
the k1+1 factor to the numerator of the scoring formulaBM25SimilaritySimilarity.SimScorer| Constructor and Description |
|---|
LegacyBM25Similarity()
Deprecated.
BM25 with these default values:
k1 = 1.2
b = 0.75
|
LegacyBM25Similarity(float k1,
float b)
Deprecated.
BM25 with the supplied parameter values.
|
| Modifier and Type | Method and Description |
|---|---|
long |
computeNorm(FieldInvertState state)
Deprecated.
|
float |
getB()
Deprecated.
Returns the
b parameter |
boolean |
getDiscountOverlaps()
Deprecated.
Returns true if overlap tokens are discounted from the document's length.
|
float |
getK1()
Deprecated.
Returns the
k1 parameter |
Similarity.SimScorer |
scorer(float boost,
CollectionStatistics collectionStats,
TermStatistics... termStats)
Deprecated.
|
void |
setDiscountOverlaps(boolean v)
Deprecated.
Sets whether overlap tokens (Tokens with 0 position increment) are
ignored when computing norm.
|
String |
toString()
Deprecated.
|
public LegacyBM25Similarity()
k1 = 1.2b = 0.75public LegacyBM25Similarity(float k1,
float b)
k1 - Controls non-linear term frequency normalization (saturation).b - Controls to what degree document length normalizes tf values.IllegalArgumentException - if k1 is infinite or negative, or if b is
not within the range [0..1]public long computeNorm(FieldInvertState state)
computeNorm in class Similaritypublic Similarity.SimScorer scorer(float boost, CollectionStatistics collectionStats, TermStatistics... termStats)
scorer in class Similaritypublic final float getK1()
k1 parameterLegacyBM25Similarity(float, float)public final float getB()
b parameterLegacyBM25Similarity(float, float)public void setDiscountOverlaps(boolean v)
public boolean getDiscountOverlaps()
setDiscountOverlaps(boolean)Copyright © 2000-2024 Apache Software Foundation. All Rights Reserved.