本文整理汇总了Java中net.semanticmetadata.lire.indexing.tools.HashingIndexor类的典型用法代码示例。如果您正苦于以下问题:Java HashingIndexor类的具体用法?Java HashingIndexor怎么用?Java HashingIndexor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HashingIndexor类属于net.semanticmetadata.lire.indexing.tools包,在下文中一共展示了HashingIndexor类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testBitSampling
import net.semanticmetadata.lire.indexing.tools.HashingIndexor; //导入依赖的package包/类
public void testBitSampling() throws IllegalAccessException, IOException, InstantiationException {
// double w = 4;
// for (int i=500; i <= 2000; i+=250) {
// for (int runs = 0; runs<100; runs++) {
File f = new File(BitSampling.hashFunctionsFileName);
if (f.exists()) f.delete();
// BitSampling.setNumFunctionBundles(80);
BitSampling.generateHashFunctions();
LocalitySensitiveHashing.generateHashFunctions();
String[] args = new String[]{"-c", "C:\\Temp\\Eval-WIPO\\2index.txt", "-l", indexPath};
HashingIndexor.main(args);
IndexReader reader = DirectoryReader.open(new RAMDirectory(FSDirectory.open(new File(indexPath)), IOContext.READONCE));
// double precision = getRecall(new BitSamplingImageSearcher(30, DocumentBuilder.FIELD_NAME_PHOG,
// DocumentBuilder.FIELD_NAME_PHOG + "_hash", new PHOG(), new FileInputStream(BitSampling.hashFunctionsFileName), 500), reader);
// System.out.println(precision);
f = new File(BitSampling.hashFunctionsFileName);
// f.renameTo(new File(runs + "_" + precision + "_" + BitSampling.hashFunctionsFileName));
// }
// }
}