Thanks Andreas,

Yes, that helps. I'd tried it before I sent the mail, but only without
n-best-list 1.

$ echo "Unix is a registered trademark licensed through X / Open Company ,
Ltd ." | TMP=/tmp
/export/home/moses/export/home/mosesmt/moses/moses-cmd/src/moses -f
/export/home/moses/engines/en2de/toy_alignment/ini/regression_tiny_alignment/moses.ini
-include-alignment-in-n-best true -use-alignment-info
-print-alignment-info-in-n-best -n-best-list - 1 -alignment-output-file -
-include-alignment-in-n-best

......
Translating: Unix is a registered trademark licensed through X / Open
Company , Ltd .

Collecting options took 0.000 seconds
Search took 0.130 seconds
0 ||| Unix ist eine eingetragene Marke qualifizierten ber X / Open Company ,
Ltd .  ||| d: 0 -3.20347 0 0 -1.88542 0 0 lm: -60.1023 w: -14 tm: -4.12539
-5.46622 -1.05002 -4.65647 6.99927 ||| -419.238 ||| 0=0 1-4=1-4 5=5 6=6 7=7
8=8 9=9 10=10 11=11 12=12 13=13 |||

// end_of_output

I am not sure if "1-4=1-4" is a right word-to-word alignment information. I
expected a mapping for individual English words, such as "1=1" "2=2". Do you
think this is an expected output? It doesn't look so if I compare the output
with

I am using non-binary phrase table just in case. And the phrase table looks
like this.

) cable is ||| - Kabel ) ist ||| 1 0.25041 1 0.0454642 2.718 ||| 1-0 1-1 0-2
2-3 ||| 1 1
) cable ||| - Kabel ) ||| 1 0.32136 1 0.118965 2.718 ||| 1-0 1-1 0-2 ||| 1 1
) in the ||| ) im Feld ||| 1 0.434847 1 0.00463835 2.718 ||| 0-0 1-1 2-2 |||
1 1
) in ||| ) im ||| 1 0.640827 1 0.316384 2.718 ||| 0-0 1-1 ||| 1 1

FYI, the latest checkout from SVN was Feb.

Thanks
Jung


On 16 March 2011 09:33, <[email protected]> wrote:

Re: [Moses-support] Word alignment
>
> Andreas Kull
> Wed, 16 Mar 2011 02:36:37 -0700
>
> Hi,
>
> I hope that I understood your question. I don't know about the score
> tool but regarding the decoder and the training options:
>
> 1. Training: You must use train-model.perl with the
> -phrase-word-alignment switch
>
> 2. Decoder output: To get the word and phrase alignment, you will need
> to specify the following switches for /moses-cmd/src/moses:
>
> -use-alignment-info
> -print-alignment-info-in-n-best
> -n-best-list - 1
> -alignment-output-file -
> -include-alignment-in-n-best
>
> With this you will get the phrase and word alignment to stdout.
>
>
> I hope this helped,
> Andreas
>
> Date: Wed, 16 Mar 2011 09:25:59 +0000
> From: "Jungwoo(Nick) Ryoo" <[email protected]>
> Subject: [Moses-support] Word alignment
> To: [email protected]
> Message-ID:
>        <[email protected]>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> I hope I am repeating questions someone already asked. I am trying to get
> the word alignment information using the toy model before rebuilding the
> real model for that purpose.
>
> 1) It seems I need to give "phrase-word-alignment" option in
> train-model.perl to put the alignment information in phrase table. But it
> is
> not documented anywhere.
>
> 2) I suppose printing word-alignment from moses decoder is still disabled.
> I
> couldn't print out the information.
>
> I tried to follow the advise from Philip.
> http://www.mail-archive.com/[email protected]/msg01740.html
>
> But I couldn't use "--WordAlignment FilePath" option The "score" tool
> didn't
> like it with "unknown option" error.
>
> $
>
> /export/home/moses/moses-scripts/current/training/phrase-extract/score/export/home/moses/engines/shared/en2de/models/toy_alignment/truecased_model/model/extract.sorted
>
> /export/home/moses/engines/shared/en2de/models/toy_alignment/truecased_model/model/lex.f2e
>
> /export/home/moses/engines/shared/en2de/models/toy_alignment/truecased_model/model/phrase-table.half.f2e
> --WordAlignment
>
> /export/home/moses/engines/shared/en2de/models/toy_alignment/truecased_model/model/
> wordalignment.info
>
> Score v2.0 written by Philipp Koehn
> scoring methods for extracted rules
> outputing word alignment
> ERROR: unknown option
> /wptg/engines/shared/en2de/models/toy_alignment/truecased_model/model/
> wordalignment.info
> Exit code: 1
>
> But the usage clearly says that it accepts such pattern of parameters
> though.
>
> $
>
> /export/home/canaan/wptgmt/moses-scripts/current/training/phrase-extract/score
> Score v2.0 written by Philipp Koehn
> scoring methods for extracted rules
> syntax: score extract lex phrase-table [--Inverse] [--Hierarchical]
> [--OnlyDirect] [--LogProb] [--NegLogProb] [--NoLex] [--GoodTuring]
> [--WordAlignment file]
>
> I wonder if there is any other way to get the word alignment information.
>
> Jung@Oracle.
>
_______________________________________________
Moses-support mailing list
[email protected]
http://mailman.mit.edu/mailman/listinfo/moses-support

Reply via email to