Hi Jason-This sounds like an interesting feature.  I'm not too familiar with
Moses's MERT architecture, but you may just need to
update IOStream::OutputNBestList to write the (unweighted) feature value for
each hypothesis in the n-best list at the appropriate position (ie, after g,
and before tm), and it may just work.

Chris

On Thu, Apr 10, 2008 at 1:39 AM, Jason Katz-Brown <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I added a new score producer that produces one score, and a
> corresponding parameter called weight-r, to my moses binary. I made a
> unit test, and I get correct scoring and translation behavior if I run
> my test with these two excerpted versions of the ini file:
>
> [weight-r]
> 0
>
> or
>
> [weight-r]
> -99
>
> So I have implemented my feature correctly in the moses binary. Now I
> am trying to learn its weight during MERT training. I am encountering
> a problem that the new feature weight is not updated after each
> iteration. Each one of the runN.moses.ini that are generated during
> mert training have
>
> [weight-r]
> -1
>
> which is the initial value. Here is how I changed mert-moses.pl to try
> to make it also train weight-r:
>
>     "lm" => [ [ 1.0, 0.0, 2.0 ] ],  # language model
>     "g"  => [ [ 1.0, 0.0, 2.0 ],    # generation model
>        [ 1.0, 0.0, 2.0 ] ],
> +   "r"  => [ [ 0.0, -1.0, 1.0 ] ], # rift penalty
>     "tm" => [ [ 0.3, 0.0, 0.5 ],    # translation model
>        [ 0.2, 0.0, 0.5 ],
>
> ...
>
> -my $ABBR_FULL_MAP = "d=weight-d lm=weight-l tm=weight-t w=weight-w
> g=weight-generation";
> +my $ABBR_FULL_MAP = "d=weight-d lm=weight-l tm=weight-t w=weight-w
> r=weight-r g=weight-generation";
>
> Am I some other change I need to make to mert-moses.pl so that it
> learns a weight for r? To help me debug this, could somebody help me
> understand these points?
>
> * What are the values stored in runN.feats.opt.gz? (Why are there many
> columns, more than the number of weights? Why are the last columns all
> whole numbers?)
> * Is there documentation regarding what runN.cands.opt and runN.init.opt
> are?
>
> By the way, the is for a rift-words feature function, which is 1 for
> each phrase case that crosses a comma, quote mark, or some other
> similar token. Redecoding with this feature weighted strongly
> negatively gave me BLEU improvements in half of my experiments, and I
> hope that automatically learning its best weight might give an
> improvement across the board, or at least justify leaving this feature
> weighted strongly negatively even if BLEU score drops.
>
> Thank you very very much!
> --Jason
> _______________________________________________
> Moses-support mailing list
> [email protected]
> http://mailman.mit.edu/mailman/listinfo/moses-support
>
_______________________________________________
Moses-support mailing list
[email protected]
http://mailman.mit.edu/mailman/listinfo/moses-support

Reply via email to