the trace file normally only shows the target side of the rule since the source isn't usually required once the rule has been found. To see source side in the trace file, add an extra feature function to your ini file [feature] SetSourcePhrase num-features=0 Then each line in the trace file will contain sourcePhrase=… Thank you, Hieu. I will try that. About the tree-to-string model in Moses - it takes a tree as input, but the resulting derivation doesn't need to be a valid tree. It uses the syntax labels only as a constraint on whether rules can be applied OK. I guess that I have to do some more background reading. I thought in string-to-tree you would still have some kind of CKY-style parsing which would give you a tree even on the target side. What I understand is that labeling can be ambiguous with respect to source side labels. But it should still be a tree after decoding, shouldn't it? Otherwise, there is also a note (4) about obtaining consistent labels at http://www.statmt.org/moses/?n=Moses.SyntaxTutorial#ntoc25 Is there already a script in Moses that I can run over an extracted rule-table to make these changes? Otherwise, are there any pitfalls that I should be aware of when doing the projection or is it as straightforward as it sounds? Thanks! Jörg On 7 May 2014 10:29, joerg <[email protected]<mailto:[email protected]>> wrote: I started to run some experiments with tree-to-string models and I would like to look closer at the derivations of the best hypothesis. Could someone explain me how to understand the trace-information and also how to get output that looks more like the ones shown at http://www.statmt.org/moses/?n=Moses.SyntaxTutorial#ntoc5 I have input like this: <tree label="ROOT"> <tree label="NOUN"> Resumption </tree> <tree label="adpmod"> <tree label="ADP"> of </tree> <tree label="adpobj"> <tree label="det"> <tree label="DET"> the </tree> </tree> <tree label="NOUN"> session </tree> </tree> </tree> </tree> and rule-tables that contain rules like the following: Resumption [NOUN] ||| reprise [X] ||| 0.103716 0.25 0.656868 1 ||| 0-0 ||| 19 3 3 ||| Resumption [adpmod][X] [ROOT] ||| reprise [adpmod][X] [X] ||| 0.110561 0.25 0.110561 1 ||| 0-0 1-1 ||| 0.999999 0.999999 0.999999 ||| Resumption of [adpobj][X] [ROOT] ||| reprise de [adpobj][X] [X] ||| 0.110561 0.0699863 0.110561 0.391762 ||| 0-0 1-1 2-2 ||| 0.999999 0.999999 0.999999 ||| Resumption of the session [ROOT] ||| reprise de la session [X] ||| 0.110561 0.00885433 0.110561 0.101433 ||| 0-0 1-1 2-2 3-3 ||| 0.999999 0.999999 0.999999 ||| My trace is then as follows: Trans Opt 0 [0..5]: [5..5]=</s> [0..4]=S : S ->S -> S </s> :0-0 : c=-1.35101 core=(0,-1,1,0,0,0,0,0,0) 4.10236core=(0,-6,10,-3.538,-4.72685,-2.88132,-2.28836,3.99959,-10.4206) Trans Opt 0 [0..4]: [4..4]=X [0..3]=S : S ->S -> S X :0-0 1-1 : c=1.1999 core=(0,-0,1,0,0,0,0,0.999896,0) 2.96706core=(0,-5,9,-3.538,-4.72685,-2.88132,-2.28836,3.99959,-10.2912) Trans Opt 0 [0..3]: [3..3]=X [0..2]=S : S ->S -> S X :0-0 1-1 : c=1.1999 core=(0,-0,1,0,0,0,0,0.999896,0) 1.05327core=(0,-4,7,-3.15851,-3.34055,-2.40175,-2.28836,2.99969,-10.2172) Trans Opt 0 [0..2]: [2..2]=X [0..1]=S : S ->S -> S X :0-0 1-1 : c=1.1999 core=(0,-0,1,0,0,0,0,0.999896,0) -0.608594core=(0,-3,5,-2.93781,-2.65946,-1.07876,-0.937101,1.99979,-10.1715) Trans Opt 0 [0..1]: [1..1]=X [0..0]=S : S ->S -> S X :0-0 1-1 : c=1.1999 core=(0,-0,1,0,0,0,0,0.999896,0) -2.0778core=(0,-2,3,-2.2661,-1.38629,-0.420272,0,0.999896,-9.72632) Trans Opt 0 [0..0]: [0..0]=<s> : S ->S -> <s> :: c=1.2 core=(0,-1,1,0,0,0,0,0,0) 1.2core=(0,-1,1,0,0,0,0,0,0) Trans Opt 0 [1..1]: [1..1]=Resumption : X ->X -> reprise :: c=-4.73173 core=(0,-1,1,-2.2661,-1.38629,-0.420272,0,0,0) -4.73173core=(0,-1,1,-2.2661,-1.38629,-0.420272,0,0,-10.2344) Trans Opt 0 [2..2]: [2..2]=of : X ->X -> de :: c=-1.83086 core=(0,-1,1,-0.671711,-1.27316,-0.658493,-0.937101,0,0) -1.83086core=(0,-1,1,-0.671711,-1.27316,-0.658493,-0.937101,0,-4.64553) Trans Opt 0 [3..3]: [3..3]=the : X ->X -> la :: c=-2.38389 core=(0,-1,1,-0.2207,-0.681098,-1.32298,-1.35126,0,0) -2.38389core=(0,-1,1,-0.2207,-0.681098,-1.32298,-1.35126,0,-5.73737) Trans Opt 0 [4..4]: [4..4]=session : X ->X -> session :: c=-4.76921 core=(0,-1,1,-0.379489,-1.38629,-0.479572,0,0,0) -4.76921core=(0,-1,1,-0.379489,-1.38629,-0.479572,0,0,-11.0403) I expected to see rule applications that include NTs like ROOT, NOUN, adpmod etc. but I don't see any. Do I have to add other flags to get this kind of information? Thanks in advance! Best, Jörg ********************************************************************************** Jörg Tiedemann http://stp.lingfil.uu.se/~joerg/ _______________________________________________ Moses-support mailing list [email protected]<mailto:[email protected]> http://mailman.mit.edu/mailman/listinfo/moses-support -- Hieu Hoang Research Associate University of Edinburgh http://www.hoang.co.uk/hieu -- Hieu Hoang Research Associate University of Edinburgh http://www.hoang.co.uk/hieu _______________________________________________ Moses-support mailing list [email protected]<mailto:[email protected]> http://mailman.mit.edu/mailman/listinfo/moses-support
_______________________________________________ Moses-support mailing list [email protected] http://mailman.mit.edu/mailman/listinfo/moses-support
