public static double evaluateReciprocalRank( HashMap<String, HashMap<Integer,Double>> relevance_judgments,
                                                 String path){
        try {
            BufferedReader reader = new BufferedReader(new FileReader(path));
            int count=0;
            String readLineString = null;
            while(reader.readLine()!=null){
                count++;
                readLineString = reader.readLine();
                Scanner s = new Scanner(readLineString).useDelimiter("\t");
                String query = s.next();
                int did = s.nextInt();

                if(!relevance_judgments.containsKey(query)){
                    throw new IOException("query not found");
                }

                HashMap<Integer,Double> qr = relevance_judgments.get(query);
                if(qr.containsKey(did)){
                    return reciprocal((double)count);
                }
            }
            reader.close();
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return 0.0;
    }