parseParameters(args);
loadRetrievalEnv();
try {
docnoMapping = RetrievalEnvironment.loadDocnoMapping(indexPath, fs);
} catch (IOException e) {
throw new ConfigurationException("Failed to load Docnomapping: "
+ e.getMessage());
}
// Load static concept importance models
for(Map.Entry<String, Node> n : importanceModels.entrySet()) {
ConceptImportanceModel m = ConceptImportanceModel.get(n.getValue());
env.addImportanceModel(n.getKey(), m);
}
// Load static docscores (e.g., spam score, PageRank, etc.).
for (Map.Entry<String, Node> n : docscores.entrySet()) {
String type = XMLTools.getAttributeValue(n.getValue(), "type", "");
String provider = XMLTools.getAttributeValue(n.getValue(), "provider", "");
String path = n.getValue().getTextContent();
if (type.equals("") || provider.equals("") || path.equals("")) {
throw new ConfigurationException("Invalid docscore!");
}
LOG.info("Loading docscore: type=" + type + ", provider=" + provider + ", path="
+ path);
env.loadDocScore(type, provider, path);