@@ -0,0 +1,1100 @@
+package lucene4ir.predictor.post;%0A%0Aimport lucene4ir.predictor.PostQPPredictor;%0Aimport lucene4ir.utils.trec.TrecRuns;%0Aimport org.apache.lucene.index.IndexReader;%0Aimport org.apache.lucene.search.Query;%0A%0A/**%0A * Created by Harry Scells on 14/9/17.%0A */%0Apublic class WIGQPPredictor extends PostQPPredictor %7B%0A%0A    private double k;%0A    private TrecRuns run;%0A%0A    public WIGQPPredictor(IndexReader ir, TrecRuns run, double k) %7B%0A        super(ir);%0A        this.k = k;%0A        this.run = run;%0A    %7D%0A%0A    private double sumScores(double queryLength, double d, double D) %7B%0A        return (1 / Math.sqrt(queryLength)) * d - D;%0A    %7D%0A%0A    @Override%0A    public double scoreQuery(String qno, Query q, String topicId) %7B%0A        double queryLength = q.toString().split(%22 %22).length;%0A        TrecRuns topic = run.getTopic(topicId);%0A        double D = topic.get(topic.size() - 1).getScore();%0A        double totalScore = 0;%0A        for (int i = 0; i %3C k; i++) %7B%0A            double d = topic.get(i).getScore();%0A            totalScore += sumScores(queryLength, d, D);%0A        %7D%0A        return (1 / k) * totalScore;%0A    %7D%0A%0A%7D%0A

Add wig predictor.