Hi Hieu,

> I can see nothing wrong with your suggestion so if u give me the change,
> I'll commit it to svn.

Diff attached below. Thanks.

> However, the decoder should be flooring the log score to -100, so something
> must be slipping thru the net.

Where is this done? I can't find any occurrences of FloorScore in the
lexical reordering code, but maybe I'm missing something. Shouldn't this
be done somewhere near the two TransformScore calls in
LexicalReorderingTable.cpp?

Best,
Christian

Index: train-factored-phrase-model.perl
===================================================================
--- train-factored-phrase-model.perl    (revision 1592)
+++ train-factored-phrase-model.perl    (working copy)
@@ -1222,14 +1222,14 @@
     my $total_previous_f = $mono_previous_f+$swap_previous_f+$other_previous_f;
     my $total_following_f = 
$mono_following_f+$swap_following_f+$other_following_f;
     if(defined($REORDERING_MODEL{"msd-f"})) {
-       printf OF ("%s ||| %.5f %.5f %.5f\n",
+       printf OF ("%s ||| %g %g %g\n",
                   $f_current, 
                   $mono_previous_f/$total_previous_f,
                   $swap_previous_f/$total_previous_f,
                   $other_previous_f/$total_previous_f);
     }
     if(defined($REORDERING_MODEL{"msd-bidirectional-f"})) {
-       printf OBF ("%s ||| %.5f %.5f %.5f %.5f %.5f %.5f\n",
+       printf OBF ("%s ||| %g %g %g %g %g %g\n",
                    $f_current, 
                    $mono_previous_f/$total_previous_f,
                    $swap_previous_f/$total_previous_f,
@@ -1239,13 +1239,13 @@
                    $other_following_f/$total_following_f);
     }
     if(defined($REORDERING_MODEL{"monotonicity-f"})) {
-       printf MF ("%s ||| %.5f %.5f\n",
+       printf MF ("%s ||| %g %g\n",
                  $f_current, 
                   $mono_previous_f/$total_previous_f,
                   ($swap_previous_f+$other_previous_f)/$total_previous_f);
     }
     if(defined($REORDERING_MODEL{"monotonicity-bidirectional-f"})) {
-       printf MBF ("%s ||| %.5f %.5f %.5f %.5f\n",
+       printf MBF ("%s ||| %g %g %g %g\n",
                    $f_current, 
                    $mono_previous_f/$total_previous_f,
                    ($swap_previous_f+$other_previous_f)/$total_previous_f,
@@ -1259,14 +1259,14 @@
     my $total_following_fe = 
$mono_following_fe+$swap_following_fe+$other_following_fe;
     
     if(defined($REORDERING_MODEL{"msd-fe"})) {
-       printf OFE ("%s ||| %s ||| %.5f %.5f %.5f\n",
+       printf OFE ("%s ||| %s ||| %g %g %g\n",
                   $f_current, $e_current, 
                   $mono_previous_fe/$total_previous_fe,
                   $swap_previous_fe/$total_previous_fe,
                   $other_previous_fe/$total_previous_fe);
     }
     if(defined($REORDERING_MODEL{"msd-bidirectional-fe"})) {
-       printf OBFE ("%s ||| %s ||| %.5f %.5f %.5f %.5f %.5f %.5f\n",
+       printf OBFE ("%s ||| %s ||| %g %g %g %g %g %g\n",
                    $f_current, $e_current, 
                    $mono_previous_fe/$total_previous_fe,
                    $swap_previous_fe/$total_previous_fe,
@@ -1276,13 +1276,13 @@
                    $other_following_fe/$total_following_fe);
     }
     if(defined($REORDERING_MODEL{"monotonicity-fe"})) {
-       printf MFE ("%s ||| %s ||| %.5f %.5f\n",
+       printf MFE ("%s ||| %s ||| %g %g\n",
                   $f_current, $e_current, 
                   $mono_previous_fe/$total_previous_fe,
                   ($swap_previous_fe+$other_previous_fe)/$total_previous_fe);
     }
     if(defined($REORDERING_MODEL{"monotonicity-bidirectional-fe"})) {
-       printf MBFE ("%s ||| %s ||| %.5f %.5f %.5f %.5f\n",
+       printf MBFE ("%s ||| %s ||| %g %g %g %g\n",
                    $f_current, $e_current, 
                    $mono_previous_fe/$total_previous_fe,
                    ($swap_previous_fe+$other_previous_fe)/$total_previous_fe,
_______________________________________________
Moses-support mailing list
[email protected]
http://mailman.mit.edu/mailman/listinfo/moses-support

Reply via email to