Class RerankerParametersReader
java.lang.Object
es.uam.eps.ir.relison.grid.ParametersReader
es.uam.eps.ir.relison.grid.links.recommendation.rerankers.RerankerParametersReader
public class RerankerParametersReader extends ParametersReader
Class for reading reranking algorithms.
For each algorithm, it reads a single configuration
File format:
rerankers:
reranker_name:
param1: ...
File format:
rerankers:
reranker_name:
param1: ...
- See Also:
ParametersReader
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,Parameters>
algorithmsGrid
Algorithms grid.private static java.lang.String
RERANKERS
-
Constructor Summary
Constructors Constructor Description RerankerParametersReader()
Constructor. -
Method Summary
Modifier and Type Method Description Parameters
getParameters(java.lang.String algorithm)
Gets the grid for a given algorithmjava.util.Set<java.lang.String>
getRerankers()
Gets the set of algorithms 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 algorithm.Methods inherited from class es.uam.eps.ir.relison.grid.ParametersReader
readBoolean, readDouble, readInteger, readLong, readOrientation, readParameters, readParameterValues, readString
-
Field Details
-
RERANKERS
private static final java.lang.String RERANKERS- See Also:
- Constant Field Values
-
algorithmsGrid
Algorithms grid. Uses a grid for each algorithm.
-
-
Constructor Details
-
RerankerParametersReader
public RerankerParametersReader()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
- the map containing the parameters for the reranker
-
readAlgorithm
private void readAlgorithm(java.util.Map.Entry<java.lang.String,java.lang.Object> element)Reads the grid for a single 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 algorithms previously read.- Returns:
- The set of algorithms previously read from the grid file.
-
getParameters
Gets the grid for a given algorithm- Parameters:
algorithm
- the algorithm to search- Returns:
- the grid if exists, an empty grid if not.
-