From 50de0e06d1f1f002ccd69b6f8e6dfb2baf12369f Mon Sep 17 00:00:00 2001 From: Barry Haddow Date: Tue, 23 Jul 2013 11:46:37 +0100 Subject: [PATCH] Generate correct ini file for lattices --- scripts/training/train-model.perl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/training/train-model.perl b/scripts/training/train-model.perl index 332eb78bb..b551fd0bc 100755 --- a/scripts/training/train-model.perl +++ b/scripts/training/train-model.perl @@ -2055,11 +2055,12 @@ sub create_ini { # lattice feature if ($_NUM_LATTICE_FEATURES) { - print INI "\n\n#lattice or confusion net weights\n[weight-i]\n"; + $feature_spec .= "InputFeature num-input-features=$_NUM_LATTICE_FEATURES\n"; + $weight_spec .= "InputFeature0="; for (1..$_NUM_LATTICE_FEATURES) { - print INI "0.1\n"; + $weight_spec .= " 0.1"; } - print "\n"; + $weight_spec .= "\n"; } # get addititional content for config file from switch or file