uk.ac.gla.dcs.renaissance.iqir
Class WeightingScheme
java.lang.Object
uk.ac.gla.dcs.renaissance.iqir.WeightingScheme
public class WeightingScheme
- extends Object
A weighting scheme for information unit vectors
- Author:
- B. Piwowarski
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
normalise
public boolean normalise
scheme
public WeightingScheme.Scheme scheme
WeightingScheme
public WeightingScheme()
init
public void init(IndexConfiguration index)
throws IOException
- Throws:
IOException
init
public void init(int nbDocuments,
int totalLength,
List<Integer> documentFrequencies,
long[] tfFrequencies)
throws IOException
- Initialise the object
- Parameters:
nbDocuments
- totalLength
- documentFrequencies
- Document term frequency (#documents where the term occurs)tfFrequencies
-
- Throws:
IOException
setTermStatistics
public void setTermStatistics(WeightingScheme.TermStatistics termStatistics)
- Set term statistics in case of
- Parameters:
termStatistics
-
weightAndNormaliseTFVector
public double weightAndNormaliseTFVector(bpiwowar.maths.matrix.DoubleMatrix1D v,
double docLength,
it.unimi.dsi.fastutil.ints.IntSet restriction)
throws IOException,
com.sleepycat.je.DatabaseException
- Process a term frequency vectors into the adequate representation
- Parameters:
nbDocuments
- The number of documentsfrequencies
- Term document frequenciesv
- A vector of term frequenciesrestriction
- If not null, Remove any component which is not within this set
- Throws:
com.sleepycat.je.DatabaseException
IOException
Copyright © 2011. All Rights Reserved.