Can I have a look at your moses.ini file. You always need a glue rule
phrase take for scfg models to create the final output

On Thu, Mar 17, 2022, 8:58 PM Oleg Parashchenko <o...@uucode.com> wrote:

> Hello,
>
> I've created and tried a hierarchical model:
>
> ```
> $ echo '<tree label="N">nhoj</tree>' | moses -f model/moses.ini
> ...
> Line 0: Initialize search took 0.000 seconds total
> Translating: <s> nhoj </s>  ||| [0,0]=X (1) [0,1]=X (1) [0,2]=X (1)
> [1,1]=X (1) [1,1]=N (1) [1,2]=X (1) [2,2]=X (1)
>
>   0   1   2
>   0   1   0
>     0   0
>       0
> Line 0: Additional reporting took 0.000 seconds total
> Line 0: Translation took 0.001 seconds total
> Translation took 0.001 seconds
> ...
> ```
>
> Something has happened, but I don't see the expected output "john".
> Adding the parameter "--inputtype 3" to moses doesn't change the result.
>
> What I'm doing wrong?
>
>
> Here is how I've built the model:
>
> ```
> $ cat corpus.en
> john
> mary
> hello
> bye
> hello john
>
> $ cat corpus.ne
> <tree label="N">nhoj</tree>
> <tree label="N">yram</tree>
> <tree label="V">olleh</tree>
> <tree label="V">eyb</tree>
> <tree label="VP"><tree label="V">olleh</tree> <tree
> label="N">hnoj</tree></tree>
>
> $ lmplz -o 2 --discount_fallback < corpus.en > lm.en
> ...
>
> $ /opt/moses/scripts/training/train-model.perl \
>   -corpus corpus \
>   -f ne -e en \
>   -lm 0:2:$(pwd)/lm.en \
>   -alignment grow-diag-final-and \
>   -external-bin-dir /opt/tools \
>   -mgiza \
>   -hierarchical \
>   2>&1 | tee train-log.txt
>
> $ cat model/rule-table.gz | gunzip -c
> <tree label="N">nhoj</tree> [X] ||| john [X] ||| 0.5 0.277778 1 1 |||
> 1-0 ||| 2 1 1 ||| |||
> ...
> ```
>
> Thanks!
>
> Regards,
> Oleg
> _______________________________________________
> Moses-support mailing list
> Moses-support@mit.edu
> https://mailman.mit.edu/mailman/listinfo/moses-support
>
_______________________________________________
Moses-support mailing list
Moses-support@mit.edu
https://mailman.mit.edu/mailman/listinfo/moses-support

Reply via email to