SymbolTable symbolTable = new BuildinSymbol(null);
GrammarReader<BilingualRule> ruleReader = new DiskHyperGraphFormatReader(rulesFile, symbolTable);
Map<String,Integer> rulesIDTable = new HashMap<String,Integer>();
ruleReader.initialize();
for (Rule rule : ruleReader) {
rulesIDTable.put(rule.toStringWithoutFeatScores(symbolTable), rule.getRuleID());
}
ruleReader.close();