Dear Philley,

the correct syntax is the following
<np translation="trg" prob="0.0">src</np>

or 
<np translation="trg" prob="1.0">src</np>

where src   a portion of the input text
and trg is the "suggested" translation for    src


I guess moses is confused by the quotation marks.

If you echo the input,  you have to use single quotes 

echo '<n translation="north" prob="1.0">sud</n>' | moses -f  moses.ini  
-xml-input inclusive
BEST TRANSLATION: north [1]  [total=-0.712] <<0.000, -1.000, 0.000, -10.794, 
0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000>>
north

echo '<n translation="north" prob="0.0">sud</n>' | moses -f  moses.ini  
-xml-input inclusive
BEST TRANSLATION: south [1]  [total=-0.899] <<0.000, -1.000, 0.000, -10.828, 
0.000, 0.000, 0.000, 0.000, 0.000, -0.313, -0.845, -0.249, -0.249, 1.000>>
south

best regards,
Nicola Bertoldi


On Mar 9, 2012, at 7:44 PM, Feifan Liu wrote:

> Dear All,
> I have a problem with xml-markup. I used the parameter "-xml-input inclusive" 
> and tried with markup "<np translation=" " prob="0.0">" and "<np 
> translation=" " prob="1.0">". 
> I expect that when "prob=1.0", the translation will be definitely the 
> markuped one, and when "prob=0.0", the translation will not be the markuped 
> one. But the output is the same. 
> 
> Anyone can help with explaining this? Or what should I do if I want different 
> output with different probabilities?  Can the input sentence be markuped with 
> different prob values? 
> Waiting for your help!
> Thanks very much.
> -Philley
> _______________________________________________
> 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