private void init(LinkDatabase linkdb, Configuration config, boolean debug, Processor processor, boolean showmatches, boolean pretty) { this.golddb = linkdb; this.dukedb = new InMemoryLinkDatabase(); //((InMemoryLinkDatabase) this.dukedb).setDoInference(true); this.idprops = config.getIdentityProperties(); this.props = config.getProperties(); this.debug = debug; this.processor = processor; this.database = processor.getDatabase(); this.linkage = !config.isDeduplicationMode(); this.showmatches = showmatches; this.pretty = pretty; }
private static void reindex(Configuration config, Database database) { System.out.println("Reindexing all records..."); Processor processor = new Processor(config, database); if (config.isDeduplicationMode()) processor.index(config.getDataSources(), DEFAULT_BATCH_SIZE); else { processor.index(config.getDataSources(1), DEFAULT_BATCH_SIZE); processor.index(config.getDataSources(2), DEFAULT_BATCH_SIZE); } } }
if (config.isDeduplicationMode()) sources = config.getDataSources(); else if (!config.isDeduplicationMode() && active) {
parser.getOptionState("showmaybe"), progress, !config.isDeduplicationMode(), config.getProperties(), pretty); if (config.isDeduplicationMode()) throw new DukeConfigException("--singlematch only works in record linkage mode"); matchall = false; if (config.isDeduplicationMode())
if (cconfig.isDeduplicationMode()) proc.linkRecords(cconfig.getDataSources()); else
pp.endElement("database"); if (config.isDeduplicationMode()) for (DataSource src : config.getDataSources()) writeDataSource(src);
private static void reindex(Configuration config, Database database) { System.out.println("Reindexing all records..."); Processor processor = new Processor(config, database); if (config.isDeduplicationMode()) processor.index(config.getDataSources(), DEFAULT_BATCH_SIZE); else { processor.index(config.getDataSources(1), DEFAULT_BATCH_SIZE); processor.index(config.getDataSources(2), DEFAULT_BATCH_SIZE); } } }
private void init(LinkDatabase linkdb, Configuration config, boolean debug, Processor processor, boolean showmatches, boolean pretty) { this.golddb = linkdb; this.dukedb = new InMemoryLinkDatabase(); ((InMemoryLinkDatabase) this.dukedb).setDoInference(true); this.idprops = config.getIdentityProperties(); this.props = config.getProperties(); this.debug = debug; this.processor = processor; this.database = processor.getDatabase(); this.linkage = !config.isDeduplicationMode(); this.showmatches = showmatches; this.pretty = pretty; }
if (config.isDeduplicationMode()) sources = config.getDataSources(); else if (!config.isDeduplicationMode() && active) {
/** * Writes the given configuration to the given file. */ public static void write(Configuration config, String file) throws IOException { FileOutputStream fos = new FileOutputStream(file); XMLPrettyPrinter pp = new XMLPrettyPrinter(fos); pp.startDocument(); pp.startElement("duke", null); // FIXME: here we should write the objects, but that's not // possible with the current API. we don't need that for the // genetic algorithm at the moment, but it will be needed in // future. pp.startElement("schema", null); writeElement(pp, "threshold", "" + config.getThreshold()); if (config.getMaybeThreshold() != 0.0) writeElement(pp, "maybe-threshold", "" + config.getMaybeThreshold()); for (Property p : config.getProperties()) writeProperty(pp, p); pp.endElement("schema"); if (config.isDeduplicationMode()) for (DataSource src : config.getDataSources()) writeDataSource(pp, src); pp.endElement("duke"); pp.endDocument(); fos.close(); }
parser.getOptionState("showmaybe"), progress, !config.isDeduplicationMode(), config.getProperties(), pretty); if (config.isDeduplicationMode()) throw new DukeConfigException("--singlematch only works in record linkage mode"); matchall = false; if (config.isDeduplicationMode())
if (listener != null) proc.addMatchListener(listener); if (cconfig.isDeduplicationMode()) proc.linkRecords(cconfig.getDataSources()); else