From: Jorge C. S. <jor...@it...> - 2007-02-23 15:22:38
|
On Friday 23 February 2007 15:57, Philipp Koehn wrote: > Hi, > > you redid here a change that I put in to enable the > optional specification of the language model type > (irst / srilm). Note that in my version was backward > compatible, so it was necessary to change it. > Or am I missing something? I didn't know that you did that change, I just saw that in the ninth step when creating the moses.ini file the variable $type was assigned no value and I was getting the following error: Use of uninitialized value in concatenation (.) or string at /home/v1jciver/Research/PB/bin/scripts/training/train-factored-phrase-model.perl line 1398. I chased up that error and I finally found this: if ($___LAST_STEP == 9) { die "use --lm factor:order:filename to specify at least one language model" if scalar @_LM == 0; foreach my $lm (@_LM) { my $type = 0; # default to srilm my ($f, $order, $filename); ($f, $order, $filename, $type) = split /:/, $lm, 4; die "Wrong format of --lm. Expected: --lm factor:order:filename" if $f !~ /^[0-9]+$/ || $order !~ /^[0-9]+$/ || !defined $filename; die "Language model file not found or empty: $filename" if ! -s $filename; push @___LM, [ $f, $order, $filename, $type ]; } } but there was no comment about the optional specification of the language model type and $type was getting no value after the parsing ($type was not zero anymore after that isolated line). For that reason, I decided to change that line. Sorry about that, Jorge |