Package org.apache.lucene.benchmark.quality

Examples of org.apache.lucene.benchmark.quality.Judge


    QualityQuery qqs[] = qReader.readQueries(new BufferedReader(new FileReader(topicsFile)));
   
    // prepare judge
    File qrelsFile = new File(srcTestDir, "trecQRels.txt");
    assertTrue("Bad qrelsFile: "+qrelsFile, qrelsFile.exists()&& qrelsFile.isFile());
    Judge judge = new TrecJudge(new BufferedReader(new FileReader(qrelsFile)));
   
    // validate topics & judgments match each other
    judge.validateData(qqs, logger);
   
    IndexSearcher searcher = new IndexSearcher(FSDirectory.open(new File(workDir,"index")), true);

    QualityQueryParser qqParser = new SimpleQQParser("title","body");
    QualityBenchmark qrun = new QualityBenchmark(qqs, qqParser, searcher, docNameField);
View Full Code Here


    QualityQuery qqs[] = qReader.readQueries(new BufferedReader(new FileReader(topicsFile)));
   
    // prepare judge
    File qrelsFile = new File(srcTestDir, "trecQRels.txt");
    assertTrue("Bad qrelsFile: "+qrelsFile, qrelsFile.exists()&& qrelsFile.isFile());
    Judge judge = new TrecJudge(new BufferedReader(new FileReader(qrelsFile)));
   
    // validate topics & judgments match each other
    judge.validateData(qqs, logger);
   
    IndexSearcher searcher = new IndexSearcher(FSDirectory.getDirectory(new File(workDir,"index")));

    QualityQueryParser qqParser = new SimpleQQParser("title","body");
    QualityBenchmark qrun = new QualityBenchmark(qqs, qqParser, searcher, docNameField);
View Full Code Here

    QualityQuery qqs[] = qReader.readQueries(new BufferedReader(new FileReader(topicsFile)));
   
    // prepare judge
    File qrelsFile = new File(srcTestDir, "trecQRels.txt");
    assertTrue("Bad qrelsFile: "+qrelsFile, qrelsFile.exists()&& qrelsFile.isFile());
    Judge judge = new TrecJudge(new BufferedReader(new FileReader(qrelsFile)));
   
    // validate topics & judgments match each other
    judge.validateData(qqs, logger);
   
    IndexSearcher searcher = new IndexSearcher(FSDirectory.open(new File(workDir,"index")));

    QualityQueryParser qqParser = new SimpleQQParser("title","body");
    QualityBenchmark qrun = new QualityBenchmark(qqs, qqParser, searcher, docNameField);
View Full Code Here

    // use trec utilities to read trec topics into quality queries
    TrecTopicsReader qReader = new TrecTopicsReader();
    QualityQuery qqs[] = qReader.readQueries(new BufferedReader(new FileReader(topicsFile)));

    // 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

    // use trec utilities to read trec topics into quality queries
    TrecTopicsReader qReader = new TrecTopicsReader();
    QualityQuery qqs[] = qReader.readQueries(new BufferedReader(new FileReader(topicsFile)));

    // 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

Related Classes of org.apache.lucene.benchmark.quality.Judge

Copyright © 2018 www.massapicom. 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.