/** * main * @param args */ public static void main(String[]args) { Index.setIndexLoadingProfileAsRetrieval(false); Index index = Index.createIndex(); if (index == null) { System.err.println("No such index"); return; } DFRDependenceScoreModifier d = new DFRDependenceScoreModifier(); d.setCollectionStatistics(index.getCollectionStatistics(), index); System.out.println(d.scoreFDSD(Integer.parseInt(args[0]), Integer.parseInt(args[1]))); }
/** * main * @param args */ public static void main(String[]args) { Index.setIndexLoadingProfileAsRetrieval(false); Index index = Index.createIndex(); if (index == null) { System.err.println("No such index"); return; } DFRDependenceScoreModifier d = new DFRDependenceScoreModifier(); d.setCollectionStatistics(index.getCollectionStatistics(), index); System.out.println(d.scoreFDSD(Integer.parseInt(args[0]), Integer.parseInt(args[1]))); }
return; Index.setIndexLoadingProfileAsRetrieval(false); IndexOnDisk indexSrc1 = Index.createIndex(args[0], args[1]); IndexOnDisk indexSrc2 = Index.createIndex(args[2], args[3]);
return; Index.setIndexLoadingProfileAsRetrieval(false);
@Override public int run(CommandLine line) throws Exception { Index.setIndexLoadingProfileAsRetrieval(false); IndexOnDisk i = Index.createIndex(); if (i== null) { System.err.println("Sorry, no index could be found in default location"); return 1; } Inverted2DirectIndexBuilder i2d = null; //disabling TR-279 optimisation //LexiconBuilder.reAssignTermIds(i, "lexicon", i.getCollectionStatistics().getNumberOfUniqueTerms()); if (line.hasOption('b')) i2d = new BlockInverted2DirectIndexBuilder(i); i2d = new Inverted2DirectIndexBuilder(i); i2d.createDirectIndex(); i.close(); return 0; }
@SuppressWarnings("deprecation") @Override public int run(String[] args) { Index.setIndexLoadingProfileAsRetrieval(false); Index i = IndexFactory.of(IndexRef.of(ApplicationSetup.TERRIER_INDEX_PATH, ApplicationSetup.TERRIER_INDEX_PREFIX)); System.out.println("Collection statistics:"); System.out.println("number of indexed documents: " + i.getCollectionStatistics().getNumberOfDocuments()); System.out.println("size of vocabulary: " + i.getCollectionStatistics().getNumberOfUniqueTerms()); System.out.println("number of tokens: " + i.getCollectionStatistics().getNumberOfTokens()); System.out.println("number of pointers: " + i.getCollectionStatistics().getNumberOfPointers()); try { i.close(); } catch (IOException e) {} return 0; }
Index.setIndexLoadingProfileAsRetrieval(false); IndexOnDisk indexSrc1 = Index.createIndex(args[0], args[1]); IndexOnDisk indexSrc2 = Index.createIndex(args[2], args[3]);
@SuppressWarnings("deprecation") @Override public int run(String[] args) { Index.setIndexLoadingProfileAsRetrieval(false); Index i = IndexFactory.of(IndexRef.of(ApplicationSetup.TERRIER_INDEX_PATH, ApplicationSetup.TERRIER_INDEX_PREFIX)); System.out.println("Collection statistics:"); System.out.println("number of indexed documents: " + i.getCollectionStatistics().getNumberOfDocuments()); System.out.println("size of vocabulary: " + i.getCollectionStatistics().getNumberOfUniqueTerms()); System.out.println("number of tokens: " + i.getCollectionStatistics().getNumberOfTokens()); System.out.println("number of pointers: " + i.getCollectionStatistics().getNumberOfPointers()); try { i.close(); } catch (IOException e) {} return 0; }
Index.setIndexLoadingProfileAsRetrieval(false); IndexOnDisk index = Index.createIndex(); if (args[0].equals("print"))
Index.setIndexLoadingProfileAsRetrieval(false); IndexOnDisk index = Index.createIndex(); if (args[0].equals("print"))
@Override @SuppressWarnings("unchecked") public int run(String[] args) throws Exception { Index.setIndexLoadingProfileAsRetrieval(false); if (args.length < 2)
@Override @SuppressWarnings("unchecked") public int run(String[] args) throws Exception { Index.setIndexLoadingProfileAsRetrieval(false); if (args.length < 2)
@Override public String apply(String t, String u) { Index.setIndexLoadingProfileAsRetrieval(false); IndexOnDisk src1 = IndexOnDisk.createIndex(path, t); IndexOnDisk src2 = IndexOnDisk.createIndex(path, u); String thisPrefix = prefix + "_merge"+mergeCounter.getAndIncrement(); IndexOnDisk newIndex = IndexOnDisk.createNewIndex(path, thisPrefix); if (blocks) new BlockStructureMerger(src1, src2, newIndex).mergeStructures(); else new StructureMerger(src1, src2, newIndex).mergeStructures(); try { src1.close(); src2.close(); newIndex.close(); //TODO: could index deletion occur in parallel IndexUtil.deleteIndex(path, t); IndexUtil.deleteIndex(path, u); } catch (IOException e) { throw new RuntimeException(e); } return thisPrefix; } };
trecQuerying.close(); } else if (printdocid) { Index.setIndexLoadingProfileAsRetrieval(false); Index i = Index.createIndex(); if (i == null) Index.setIndexLoadingProfileAsRetrieval(false); Index i = Index.createIndex(); if (i == null) Index.setIndexLoadingProfileAsRetrieval(false); Index i = Index.createIndex(); if (i == null) Index.setIndexLoadingProfileAsRetrieval(false); Index i = Index.createIndex(); if (i == null) Index.setIndexLoadingProfileAsRetrieval(false); Index i = Index.createIndex(); if (i == null) Index.setIndexLoadingProfileAsRetrieval(false); Index i = Index.createIndex(); if (i == null)
trecQuerying.close(); } else if (printdocid) { Index.setIndexLoadingProfileAsRetrieval(false); Index i = Index.createIndex(); if (i == null) Index.setIndexLoadingProfileAsRetrieval(false); Index i = Index.createIndex(); if (i == null) Index.setIndexLoadingProfileAsRetrieval(false); Index i = Index.createIndex(); if (i == null) Index.setIndexLoadingProfileAsRetrieval(false); Index i = Index.createIndex(); if (i == null) Index.setIndexLoadingProfileAsRetrieval(false); Index i = Index.createIndex(); if (i == null) Index.setIndexLoadingProfileAsRetrieval(false); Index i = Index.createIndex(); if (i == null)