uk.ac.gla.dcs.renaissance.interference
Class InterferenceScorer
java.lang.Object
it.unimi.dsi.fastutil.ints.AbstractIntIterator
it.unimi.dsi.mg4j.search.score.AbstractScorer
it.unimi.dsi.mg4j.search.score.AbstractIndexScorer
it.unimi.dsi.mg4j.search.score.AbstractWeightedScorer
uk.ac.gla.dcs.renaissance.interference.InterferenceScorer
- All Implemented Interfaces:
- it.unimi.dsi.fastutil.ints.IntIterator, it.unimi.dsi.lang.FlyweightPrototype<it.unimi.dsi.mg4j.search.score.Scorer>, it.unimi.dsi.mg4j.search.score.DelegatingScorer, it.unimi.dsi.mg4j.search.score.Scorer, Iterator<Integer>
public class InterferenceScorer
- extends it.unimi.dsi.mg4j.search.score.AbstractWeightedScorer
- implements it.unimi.dsi.mg4j.search.score.DelegatingScorer, Scorer
A scorer that implements a modified BM25 ranking formula.
Field Summary |
double |
b
The parameter b. |
static double |
DEFAULT_B
The default value used for the parameter b. |
static double |
DEFAULT_K1
The default value used for the parameter k1. |
static double |
EPSILON_SCORE
The value of the document-frequency part for terms appearing in more than
half of the documents. |
double |
k1
The parameter k1. |
it.unimi.dsi.util.StringMap<? extends CharSequence> |
termMap
Term map |
Fields inherited from class it.unimi.dsi.mg4j.search.score.AbstractWeightedScorer |
currWeight, index2Weight |
Fields inherited from class it.unimi.dsi.mg4j.search.score.AbstractIndexScorer |
currIndex, n |
Fields inherited from class it.unimi.dsi.mg4j.search.score.AbstractScorer |
documentIterator |
Constructor Summary |
InterferenceScorer(it.unimi.dsi.mg4j.document.DocumentCollection collection,
it.unimi.dsi.mg4j.index.TermProcessor processor,
PhasesComputer phasesComputer,
int fieldIndex,
it.unimi.dsi.util.StringMap<? extends CharSequence> termMap)
|
InterferenceScorer(double k1,
double b,
it.unimi.dsi.mg4j.document.DocumentCollection collection,
it.unimi.dsi.mg4j.index.TermProcessor processor,
PhasesComputer phasesComputer,
int fieldIndex,
it.unimi.dsi.util.StringMap<? extends CharSequence> termMap)
|
InterferenceScorer(String k1,
String b,
it.unimi.dsi.mg4j.document.DocumentCollection collection,
it.unimi.dsi.mg4j.index.TermProcessor processor,
PhasesComputer phasesComputer,
int fieldIndex,
it.unimi.dsi.util.StringMap<? extends CharSequence> termMap)
|
Method Summary |
InterferenceScorer |
copy()
|
double |
score()
|
double |
score(it.unimi.dsi.mg4j.index.Index index)
|
void |
setInterferenceModel(uk.ac.gla.dcs.renaissance.interference.InterferenceScorer.InterferenceModel interferenceModel)
|
void |
setJudgments(Map<String,Integer> judgments)
|
void |
setOutput(File documentOuputFile)
|
void |
setTopicId(String topicId)
|
boolean |
usesIntervals()
|
void |
wrap(it.unimi.dsi.mg4j.search.DocumentIterator d)
|
void |
wrap(it.unimi.dsi.mg4j.search.DocumentIterator documentIterator,
it.unimi.dsi.mg4j.search.score.ScoredDocumentBoundedSizeQueue<it.unimi.dsi.fastutil.objects.Reference2ObjectMap<it.unimi.dsi.mg4j.index.Index,it.unimi.dsi.mg4j.query.SelectedInterval[]>> top)
|
Methods inherited from class it.unimi.dsi.mg4j.search.score.AbstractWeightedScorer |
getWeights, setWeights |
Methods inherited from class it.unimi.dsi.mg4j.search.score.AbstractScorer |
hasNext, nextDocument, nextInt, skip |
Methods inherited from class it.unimi.dsi.fastutil.ints.AbstractIntIterator |
next, remove |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface it.unimi.dsi.mg4j.search.score.Scorer |
getWeights, nextDocument, nextInt, setWeights |
Methods inherited from interface it.unimi.dsi.fastutil.ints.IntIterator |
skip |
DEFAULT_K1
public static final double DEFAULT_K1
- The default value used for the parameter k1.
- See Also:
- Constant Field Values
DEFAULT_B
public static final double DEFAULT_B
- The default value used for the parameter b.
- See Also:
- Constant Field Values
EPSILON_SCORE
public static final double EPSILON_SCORE
- The value of the document-frequency part for terms appearing in more than
half of the documents.
- See Also:
- Constant Field Values
termMap
public final it.unimi.dsi.util.StringMap<? extends CharSequence> termMap
- Term map
k1
public final double k1
- The parameter k1.
b
public final double b
- The parameter b.
InterferenceScorer
public InterferenceScorer(it.unimi.dsi.mg4j.document.DocumentCollection collection,
it.unimi.dsi.mg4j.index.TermProcessor processor,
PhasesComputer phasesComputer,
int fieldIndex,
it.unimi.dsi.util.StringMap<? extends CharSequence> termMap)
InterferenceScorer
public InterferenceScorer(double k1,
double b,
it.unimi.dsi.mg4j.document.DocumentCollection collection,
it.unimi.dsi.mg4j.index.TermProcessor processor,
PhasesComputer phasesComputer,
int fieldIndex,
it.unimi.dsi.util.StringMap<? extends CharSequence> termMap)
InterferenceScorer
public InterferenceScorer(String k1,
String b,
it.unimi.dsi.mg4j.document.DocumentCollection collection,
it.unimi.dsi.mg4j.index.TermProcessor processor,
PhasesComputer phasesComputer,
int fieldIndex,
it.unimi.dsi.util.StringMap<? extends CharSequence> termMap)
copy
public InterferenceScorer copy()
- Specified by:
copy
in interface it.unimi.dsi.lang.FlyweightPrototype<it.unimi.dsi.mg4j.search.score.Scorer>
- Specified by:
copy
in interface it.unimi.dsi.mg4j.search.score.Scorer
score
public double score()
throws IOException
- Specified by:
score
in interface it.unimi.dsi.mg4j.search.score.Scorer
- Overrides:
score
in class it.unimi.dsi.mg4j.search.score.AbstractWeightedScorer
- Throws:
IOException
score
public double score(it.unimi.dsi.mg4j.index.Index index)
- Specified by:
score
in interface it.unimi.dsi.mg4j.search.score.Scorer
wrap
public void wrap(it.unimi.dsi.mg4j.search.DocumentIterator d)
throws IOException
- Specified by:
wrap
in interface it.unimi.dsi.mg4j.search.score.Scorer
- Overrides:
wrap
in class it.unimi.dsi.mg4j.search.score.AbstractWeightedScorer
- Throws:
IOException
usesIntervals
public boolean usesIntervals()
- Specified by:
usesIntervals
in interface it.unimi.dsi.mg4j.search.score.Scorer
wrap
public void wrap(it.unimi.dsi.mg4j.search.DocumentIterator documentIterator,
it.unimi.dsi.mg4j.search.score.ScoredDocumentBoundedSizeQueue<it.unimi.dsi.fastutil.objects.Reference2ObjectMap<it.unimi.dsi.mg4j.index.Index,it.unimi.dsi.mg4j.query.SelectedInterval[]>> top)
throws IOException
- Throws:
IOException
setJudgments
public void setJudgments(Map<String,Integer> judgments)
setOutput
public void setOutput(File documentOuputFile)
throws FileNotFoundException
- Throws:
FileNotFoundException
setTopicId
public void setTopicId(String topicId)
setInterferenceModel
public void setInterferenceModel(uk.ac.gla.dcs.renaissance.interference.InterferenceScorer.InterferenceModel interferenceModel)
Copyright © 2011. All Rights Reserved.