Package no.priv.garshol.duke.matchers

Examples of no.priv.garshol.duke.matchers.TestFileListener


                             pretty);
    processor.addMatchListener(listener);

    // needs to be before the link file handler, in case the link file
    // is the same as the test file
    TestFileListener testfile = null;
    if (parser.getOptionValue("testfile") != null) {
      testfile = new TestFileListener(parser.getOptionValue("testfile"),
                                      config,
                                      parser.getOptionState("testdebug"),
                                      processor,
                                      showmatches,
                                      pretty);
      testfile.setPessimistic(true);
      processor.addMatchListener(testfile);
    }

    AbstractLinkFileListener linkfile = null;
    if (parser.getOptionValue("linkfile") != null) {
View Full Code Here


   */
  private double evaluate(GeneticConfiguration config,
                          MatchListener listener) {
    Configuration cconfig = config.getConfiguration();
    Processor proc = new Processor(cconfig, database);
    TestFileListener eval = makeEval(cconfig, testdb, proc);

    if (active || incomplete)
      // in active learning the test file is incomplete, so F-number eval
      // should be optimistic. similarly if the test file is known to be
      // incomplete, for whatever reason
      eval.setPessimistic(false);

    proc.addMatchListener(eval);
    TestFileListener seval = null;
    if (scientific) {
      seval = makeEval(cconfig, ((LinkFileOracle) oracle).getLinkDatabase(),
                       proc);
      seval.setPessimistic(true);
      proc.addMatchListener(seval);
    }
    if (listener != null)
      proc.addMatchListener(listener);
    if (cconfig.isDeduplicationMode())
      proc.linkRecords(cconfig.getDataSources());
    else
      proc.linkRecords(cconfig.getDataSources(2), false);

    if (seval != null)
      sciencetracker.put(config, seval.getFNumber());

    config.setFNumber(eval.getFNumber());
    return eval.getFNumber();
  }
View Full Code Here

    return eval.getFNumber();
  }

  private TestFileListener makeEval(Configuration cfg, LinkDatabase testdb,
                                    Processor proc) {
    TestFileListener eval = new TestFileListener(testdb, cfg, false,
                                                 proc, false, false);
    eval.setQuiet(true);
    return eval;
  }
View Full Code Here

TOP

Related Classes of no.priv.garshol.duke.matchers.TestFileListener

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.