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: ...
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 algorithm
    java.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 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • 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

      public Grid getGrid​(java.lang.String reranker)
      Gets the grid for a given algorithm
      Parameters:
      reranker - the reranker to search
      Returns:
      The grid if exists, an empty grid if not.