Dear Nicola, Thanks for your reply. But I did use the same syntax as you did.
echo '<np translation="hy" prob="0.0">complained</np>' | ../../tools/mosesdecoder/dist/bin/moses -f moses.ini -xml-input inclusive 2>/dev/null hy BEST TRANSLATION: hy [1] [total=-28.871] <<0.000, -1.000, 0.000, -18.542, -20.000, -20.000, -20.000, -20.000, -20.000>> Anything I was missing? -Philley On Fri, Mar 9, 2012 at 1:46 PM, Nicola Bertoldi <[email protected]> wrote: > 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 > > > > > > 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
