|
Qizx fe-4.4p2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.qizx.api.util.fulltext.DefaultScorer
public class DefaultScorer
Default scorer implementation
Field Summary | |
---|---|
static String |
FT_WEIGHT
Name of the metadata property which can contain a weight for a Document. |
Fields inherited from interface com.qizx.api.fulltext.Scorer |
---|
CORE_SCORE |
Constructor Summary | |
---|---|
DefaultScorer()
|
Method Summary | |
---|---|
float |
getDocumentWeight(Document scoredDocument)
Support of document ranking: returns a positive number (default 1) which is used as a weight for the document. |
float |
normalizeScore(float rawScore)
Normalizes a score so that its value is between 0 and 1 |
float |
normAll(float[] subWeights)
Computes the weight norm associated with a conjunction ('ftand' or 'all') of full-text selections. |
float |
normOr(float[] subWeights)
Computes the weight norm associated with a disjunction ('ftor' or 'any') of full-text selections. |
float |
normWord(float inverseDocFrequency)
Computes the weight associated with a simple word. |
float |
scoreAll(float[] scores)
Computes the score of a conjunction ('ftand' or 'all') of full-text selections. |
float |
scoreOr(float[] scores,
int scoreCount)
Computes the score of a disjunction ('ftor' or 'any') of full-text selections. |
float |
scoreWord(float norm,
float termFrequency)
Computes the score of a single word. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String FT_WEIGHT
Constructor Detail |
---|
public DefaultScorer()
Method Detail |
---|
public float normalizeScore(float rawScore)
Scorer
normalizeScore
in interface Scorer
rawScore
- a positive value possibly greater than 1public float normWord(float inverseDocFrequency)
Scorer
normWord
in interface Scorer
inverseDocFrequency
- inverse of the fraction of documents that
contain this term
public float scoreWord(float norm, float termFrequency)
Scorer
scoreWord
in interface Scorer
norm
- normalized weight of word (as computed by Scorer.normWord(float)
).termFrequency
- relative term frequency in the current document
(number of occurrences divided by average number of occurrences in all
documents).
public float normAll(float[] subWeights)
Scorer
normAll
in interface Scorer
subWeights
- weight values computed for sub-selections.
public float scoreAll(float[] scores)
Scorer
scoreAll
in interface Scorer
scores
- weight values computed for sub-selections.
public float normOr(float[] subWeights)
Scorer
normOr
in interface Scorer
subWeights
- weight values computed for sub-selections.
public float scoreOr(float[] scores, int scoreCount)
Scorer
scoreOr
in interface Scorer
scores
- weight values computed for sub-selections.scoreCount
- number of values in scores
public float getDocumentWeight(Document scoredDocument)
Scorer
getDocumentWeight
in interface Scorer
scoredDocument
- document to weight. Typically, the weight is a
metadata property of the document.
|
© 2010 Axyana Software | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |