Package org.apache.lucene.benchmark.quality.trec

Examples of org.apache.lucene.benchmark.quality.trec.TrecJudge.validateData()


    // prepare judge
    InputStream qrels = getClass().getResourceAsStream("trecQRels.txt");
    Judge judge = new TrecJudge(new BufferedReader(new InputStreamReader(qrels, "UTF-8")));
   
    // validate topics & judgments match each other
    judge.validateData(qqs, logger);
   
    Directory dir = newFSDirectory(new File(getWorkDir(),"index"));
    IndexSearcher searcher = new IndexSearcher(dir, true);

    QualityQueryParser qqParser = new SimpleQQParser("title","body");
View Full Code Here


    // prepare judge, with trec utilities that read from a QRels file
    Judge judge = new TrecJudge(new BufferedReader(new FileReader(qrelsFile)));

    // validate topics & judgments match each other
    judge.validateData(qqs, logger);

    Set<String> fieldSet = new HashSet<String>();
    if (fieldSpec.indexOf('T') >= 0) fieldSet.add("title");
    if (fieldSpec.indexOf('D') >= 0) fieldSet.add("description");
    if (fieldSpec.indexOf('N') >= 0) fieldSet.add("narrative");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.