private void setupFeatureTemplates(){
this.featTemplates = new ArrayList<FeatureTemplate>();
if(MRConfig.useBaseline){
FeatureTemplate ft = new BaselineFT(MRConfig.baselineFeatureName, true);
featTemplates.add(ft);
}
if(MRConfig.useIndividualBaselines){
for(int id : MRConfig.baselineFeatIDsToTune){
String featName = MRConfig.individualBSFeatNamePrefix +id;
FeatureTemplate ft = new IndividualBaselineFT(featName, id, true);
featTemplates.add(ft);
}
}
if(MRConfig.useSparseFeature){
if(MRConfig.useMicroTMFeat){
//FeatureTemplate ft = new TMFT(symbolTbl, useIntegerString, MRConfig.useRuleIDName);
this.microRuleFeatureTemplate = new MicroRuleFT(MRConfig.useRuleIDName, MRConfig.startTargetNgramOrder, MRConfig.endTargetNgramOrder, MRConfig.wordMapFile);
featTemplates.add(microRuleFeatureTemplate);
}
if(MRConfig.useTMFeat){
FeatureTemplate ft = new TMFT(symbolTbl, useIntegerString, MRConfig.useRuleIDName);
featTemplates.add(ft);
}
if(MRConfig.useTMTargetFeat){
FeatureTemplate ft = new TargetTMFT(symbolTbl, useIntegerString);
featTemplates.add(ft);
}
if(MRConfig.useLMFeat){
FeatureTemplate ft = new NgramFT(symbolTbl, useIntegerString, MRConfig.ngramStateID,
MRConfig.baselineLMOrder, MRConfig.startNgramOrder, MRConfig.endNgramOrder);
featTemplates.add(ft);
}
}