e.setValue(new CompoundWordIterator(
dummyBuffer, compoundTokens));
}
} catch (IOException ioe) {
// rethrow
throw new IOError(ioe);
}
} else {
// If the user did not specify a set of compound tokens, null out
// the set, in the event that there was one previously
compoundTokens = null;
}
String replacementProp =
props.getProperty(TOKEN_REPLACEMENT_FILE_PROPERTY);
if (replacementProp != null) {
try {
BufferedReader br = resourceFinder.open(replacementProp);
replacementMap = new HashMap<String, String>();
String line = null;
while ((line = br.readLine()) != null) {
String[] termReplacement = line.split("\\s+");
replacementMap.put(termReplacement[0], termReplacement[1]);
}
} catch (IOException ioe) {
throw new IOError(ioe);
}
} else
replacementMap = null;
}