Class RerankerGridReader
java.lang.Object
es.uam.eps.ir.relison.grid.GridReader
es.uam.eps.ir.relison.grid.links.recommendation.rerankers.RerankerGridReader
public class RerankerGridReader extends GridReader
Class for reading reranking algorithms.
For each algorithm, a grid of parameters is read.
File format:
rerankers:
reranker_name:
param1: ...
File format:
rerankers:
reranker_name:
param1: ...
- See Also:
GridReader
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
RERANKERS
private java.util.Map<java.lang.String,Grid>
rerankersGrid
Algorithms grid. -
Constructor Summary
Constructors Constructor Description RerankerGridReader()
Constructor -
Method Summary
Modifier and Type Method Description Grid
getGrid(java.lang.String reranker)
Gets the grid for a given algorithmjava.util.Set<java.lang.String>
getRerankers()
Gets the set of rerankers previously read.void
read(java.util.Map<java.lang.String,java.lang.Object> map)
Obtains the algorithm grids for different reranking algorithms.private void
readAlgorithm(java.util.Map.Entry<java.lang.String,java.lang.Object> element)
Reads the grid for a single reranking algorithm.Methods inherited from class es.uam.eps.ir.relison.grid.GridReader
readBooleanGrid, readDoubleGrid, readGridGrid, readIntegerGrid, readLongGrid, readOrientationGrid, readParameterGrid, readStringGrid
-
Field Details
-
RERANKERS
private static final java.lang.String RERANKERS- See Also:
- Constant Field Values
-
rerankersGrid
Algorithms grid. Uses a grid for each algorithm.
-
-
Constructor Details
-
RerankerGridReader
public RerankerGridReader()Constructor
-
-
Method Details
-
read
public void read(java.util.Map<java.lang.String,java.lang.Object> map)Obtains the algorithm grids for different reranking algorithms.- Parameters:
map
- a map containing the information in the YAML file about the different algorithms.
-
readAlgorithm
private void readAlgorithm(java.util.Map.Entry<java.lang.String,java.lang.Object> element)Reads the grid for a single reranking algorithm.- Parameters:
element
- A map containing the information in the YAML file about the algorithm.
-
getRerankers
public java.util.Set<java.lang.String> getRerankers()Gets the set of rerankers previously read.- Returns:
- The set of rerankers previously read from the grid file.
-
getGrid
Gets the grid for a given algorithm- Parameters:
reranker
- the reranker to search- Returns:
- The grid if exists, an empty grid if not.
-