// TODO: maybe move to JoshuaConfiguration to enable moving the featureFunction parsing there (Sets: symbolTable, defaultNonterminals)
private void initializeSymbolTable(SymbolTable existingSymbols) {
if (JoshuaConfiguration.use_remote_lm_server) {
if (null == existingSymbols) {
// Within the decoder, we assume BuildinSymbol when using the remote LM
this.symbolTable = new BuildinSymbol(JoshuaConfiguration.remote_symbol_tbl);
} else {
this.symbolTable = existingSymbols;
}
} else if (JoshuaConfiguration.use_srilm) {
logger.finest("Using SRILM symbol table");
if (null == existingSymbols) {
this.symbolTable = new SrilmSymbol(JoshuaConfiguration.lmOrder);
} else {
logger.finest("Populating SRILM symbol table with symbols from existing symbol table");
this.symbolTable = new SrilmSymbol(existingSymbols, JoshuaConfiguration.lmOrder);
}
} else {
if (null == existingSymbols) {
//this.symbolTable = new Vocabulary();//new BuildinSymbol(null);
this.symbolTable = new BuildinSymbol();
} else {
this.symbolTable = existingSymbols;
}
}