use of org.edamontology.edammap.core.processing.ProcessorArgs in project edammap by edamontology.
the class Util method makeIdf.
private static void makeIdf(String queryPath, String database, String idfPath, UtilArgs args, boolean stemming) throws IOException, ParseException {
logger.info("Make query IDF from file {} of type {} to {}{}", queryPath, args.makeIdfType, idfPath, database != null ? " using database " + database : "");
ProcessorArgs processorArgs = new ProcessorArgs();
processorArgs.setFetching(false);
processorArgs.setDb(database);
processorArgs.setIdf(null);
processorArgs.setIdfStemmed(null);
Processor processor = new Processor(processorArgs);
int idfs = processor.makeQueryIdf(QueryLoader.get(queryPath, args.makeIdfType, args.fetcherArgs.getTimeout(), args.fetcherArgs.getPrivateArgs().getUserAgent()), args.makeIdfType, idfPath, args.makeIdfWebpagesDocs, args.makeIdfFulltext, new PreProcessor(stemming), null, args.fetcherArgs);
logger.info("Wrote {} IDFs to {}", idfs, idfPath);
}
Aggregations