Dear Francis

Thanks for this.  V useful.

I also changed line 92, in the subroutine train_recase_model, changing 
the --lm flag at the end of the line:

  from:

    my $cmd = "$TRAIN_SCRIPT --root-dir $DIR --model-dir $DIR 
--first-step $first --alignment a --corpus $DIR/aligned --f lowercased 
--e cased --max-phrase-length $MAX_LEN --lm 0:3:$DIR/cased.srilm.gz:0";

  to:

    my $cmd = "$TRAIN_SCRIPT --root-dir $DIR --model-dir $DIR 
--first-step $first --alignment a --corpus $DIR/aligned --f lowercased 
--e cased --max-phrase-length $MAX_LEN --lm 0:3:$DIR/cased.irstlm.gz:1";

With this change the moses.ini is generated correctly and does not need 
editing.

Best

Ivan

> From: Francis Tyers <fty...@...>
> Subject: Recaser using IRSTLM
> Newsgroups: gmane.comp.nlp.moses.user
> Date: 2009-07-30 13:00:12 GMT (24 weeks, 1 hour and 24 minutes ago)
>
> Hello everyone,
>
> I'm emailing this in case anyone in the future is trying to get the
> recaser script working with IRSTLM. I couldn't find any record of it on
> the mailing list (or in the various FAQs), so perhaps it will be
> helpful.
>
> First replace
>
>     #my $cmd = "$NGRAM_COUNT -text $CORPUS -lm $DIR/cased.srilm.gz
> -interpolate -kndiscount";
>
> with
>
>     my $cmd = "/path/to/irstlm/bin/build-lm.sh -t /tmp -i $CORPUS -n 3
> -o $DIR/cased.irstlm.gz";
>
> in train-recaser.perl
>
> Then after you've run the training, edit the file recaser/moses.ini and
> change
>
>     0 1 3 /path/to/recaser//cased.irstlm.gz
>
> to
>
>     1 0 3 /path/to/recaser//cased.irstlm.gz
>
> That's all. It might seem obvious, but it took me a bit of fiddling to
> work out.
>
> Regards,
>
> Fran


-- 
********************************
Ivan Uemlianin

Canolfan Bedwyr
Safle'r Normal Site
Prifysgol Bangor University
BANGOR
Gwynedd
LL57 2PZ

[email protected]
http://www.bangor.ac.uk/~cbs007/
********************************

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

Reply via email to