Class DocumentRankScorer

    • Constructor Detail

      • DocumentRankScorer

        public DocumentRankScorer​(String filename)
                           throws IOException
        Builds a document scorer by reading the ranks from a file. Ranks are saved as doubles (the first double is the rank of document 0 and so on).

        This constructor can be used with an ObjectParser.

        Parameters:
        filename - the name of the rank file.
        Throws:
        IOException
      • DocumentRankScorer

        public DocumentRankScorer​(String filename,
                                  String type)
                           throws IOException
        Builds a document scorer by reading the ranks from a file of specified type.

        This constructor can be used with an ObjectParser.

        Parameters:
        filename - the name of the rank file.
        type - one of int, long, float or double.
        Throws:
        IOException
        See Also:
        DocumentRankScorer(String)
      • DocumentRankScorer

        public DocumentRankScorer​(String filename,
                                  String type,
                                  boolean gzip)
                           throws IOException
        Builds a document scorer by reading the ranks from a file of specified type.
        Parameters:
        filename - the name of the rank file.
        type - one of int, long, float or double.
        gzip - whether the file is gzip'd.
        Throws:
        IOException
        See Also:
        DocumentRankScorer(String)
      • DocumentRankScorer

        public DocumentRankScorer​(double[][] score)
        Builds a document scorer with given scores.
        Parameters:
        score - the scores (they are not copied, so the caller is supposed not to change their values).