Hello,

I'm not really familiar with the mert code but it seems that "I" does
not get stored in the variable "used_triples" which contains a list of
used models (d, w, lm, tm) (even though I inserted "weight-i" into
moses.ini). Therefore, I added the following lines into mert in order to
insert "I" explicitly into "used_triples" as it is done with "d":

 push @{$used_triples{"I"}}, [0.0, 0.0, 0.0]
    if defined $config_weights->{"I"}
      && (!defined $used_triples{"I"}
          || scalar @{$config_weights->{"I"}}
             == scalar @{$used_triples{"I"}} +1);

Having added these lines, mert runs fine.


As proposed, I also changed the line 73. Still, "I" gets tuned... By
activating the option "--activate-features", "I" indeed does not get
tuned. Nevertheless, I don't understand why the specification of
possible "I" values
("I" => [ [ 0.0, 0.0, 0.0 ],], # input lattice scores) is ignored in the
tuning process. 


Am 21.03.2011 15:42, schrieb Rico Sennrich:
> Anita Gojun <Anita.Gojun@...> writes:
>
>   
>>
>> Hello,
>> I have some problems with running mert when the SL input is a lattice. 
>> 1) Weight-i
>> The transition probabilities in my lattices should not have an impact
>> on the probability of a generated hypothesis. How can I tell
>> mert that "weight-i" should not be tuned? 
>>     
> You could fiddle with the mert-moses.pl script (line 73) to limit the range:
>
> "I"  => [ [ 0.0, 0.0, 0.0 ],],  # input lattice scores
>
> Or you use the --activate-features option to selectively activate features.
>
>   
>> 2) Mert aborts with an error message:
>> I ran mert with a SL input in a lattice format using the following
>> command:scripts-20110203-1116/training/mert-moses.pl
>> --no-filter-phrase-table --decoder-flags '-inputtype 2 -weight-i 0'
>> en_lattice dev_de moses-cmd/src/moses model/moses_lattice.ini
>> --working-dir tuning_lattice --rootdir scripts-20110203-1116
>> Running this command leads to the following error:Can't use an undefined 
>> value
>>     
> as an ARRAY reference at
>   
>> scripts-20110203-1116/training/mert-moses.pl line 688.
>>     
> mert doesn't use the decoder flags itself. you need to include weight-i in 
> your
> moses.ini file:
>
> [weight-i]
> 0
>
> hope this helps,
> Rico
>
> _______________________________________________
> Moses-support mailing list
> [email protected]
> http://mailman.mit.edu/mailman/listinfo/moses-support
>   


-- 
Dipl-Ling. Anita Gojun

Universitaet Stuttgart
Institut fuer maschinelle Sprachverarbeitung
Azenbergstrasse 12  
D-70174 Stuttgart, Germany

Tel: (+49)711/685-84584
E-Mail: [email protected]

_______________________________________________
Moses-support mailing list
[email protected]
http://mailman.mit.edu/mailman/listinfo/moses-support

Reply via email to