Moses-support Digest, Vol 91, Issue 18

Send Moses-support mailing list submissions to
moses-support@mit.edu

To subscribe or unsubscribe via the World Wide Web, visit
http://mailman.mit.edu/mailman/listinfo/moses-support
or, via email, send a message with subject or body 'help' to
moses-support-request@mit.edu

You can reach the person managing the list at
moses-support-owner@mit.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Moses-support digest..."


Today's Topics:

1. Re: moses_chart traces (J?rg Tiedemann)
2. Re: moses_chart traces (Hieu Hoang)


----------------------------------------------------------------------

Message: 1
Date: Wed, 14 May 2014 07:58:07 +0000
From: J?rg Tiedemann <Jorg.Tiedemann@lingfil.uu.se>
Subject: Re: [Moses-support] moses_chart traces
To: Hieu Hoang <Hieu.Hoang@ed.ac.uk>
Cc: moses-support <moses-support@mit.edu>
Message-ID: <1484108B-71F8-415F-8F55-5DB71C437796@lingfil.uu.se>
Content-Type: text/plain; charset="windows-1252"


To follow up on the tracing problems. I added now the sourcePhrase feature function. My output is now like this:

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) sourcePhrase=X </s> 3.97252core=(0,-6,10,-3.48177,-5.5193,-2.44483,-2.63781,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) sourcePhrase=X X 2.83722core=(0,-5,9,-3.48177,-5.5193,-2.44483,-2.63781,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) sourcePhrase=X X 0.909388core=(0,-4,7,-3.09425,-4.70708,-1.94095,-2.16629,2.99969,-10.2172)

which still includes the nonlinguistic labels X instead of the tree labels from my input sentence. Here is the input tree once again:

<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>

Did I miss something else that I have to set to obtain the source language labels used as constraints in decoding or is there something wrong with my example?

Thanks again,
J?rg





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 <tiedeman@gmail.com<mailto:tiedeman@gmail.com>> 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
Moses-support@mit.edu<mailto:Moses-support@mit.edu>
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
Moses-support@mit.edu<mailto:Moses-support@mit.edu>
http://mailman.mit.edu/mailman/listinfo/moses-support

_______________________________________________
Moses-support mailing list
Moses-support@mit.edu<mailto:Moses-support@mit.edu>
http://mailman.mit.edu/mailman/listinfo/moses-support

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/mailman/private/moses-support/attachments/20140514/bc491053/attachment-0001.htm

------------------------------

Message: 2
Date: Wed, 14 May 2014 09:51:26 +0100
From: Hieu Hoang <Hieu.Hoang@ed.ac.uk>
Subject: Re: [Moses-support] moses_chart traces
To: J?rg Tiedemann <Jorg.Tiedemann@lingfil.uu.se>
Cc: moses-support <moses-support@mit.edu>
Message-ID:
<CAEKMkbg5VVGCoB43reSw6Oh+YfPg1gj7vN08pyX1-Y+MJ-RzMQ@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

these are the glue rules. For convenience, the input tree also contains 'X'
labels for all spans so that the simple hiero glue rule can apply.

If you want proper syntactic glue rules, then replace the glue grammar
<s> [X] ||| <s> [S] ||| 1 ||| ||| 0
[X][S] </s> [X] ||| [X][S] </s> [S] ||| 1 ||| 0-0 ||| 0
[X][S] [X][X] [X] ||| [X][S] [X][X] [S] ||| 2.718 ||| 0-0 1-1 ||| 0
with
<s> [???] ||| <s> [S] ||| 1 ||| ||| 0
[NN][S] </s> [NP] ||| [NN][S] < /s> [S] ||| 1 ||| 0-0 ||| 0
[NNS][S] </s> [NP] ||| [NNS][S] </s> [S] ||| 1 ||| 0-0 ||| 0
[NNP][S] </s> [NP] ||| [NNP][S] </s> [S] ||| 1 ||| 0-0 ||| 0
...
[V][S] </s> [VP] ||| [V][S] </s> [S] ||| 1 ||| 0-0 ||| 0
[VINF][S] </s> [VP] ||| [VINF][S] </s> [S] ||| 1 ||| 0-0 ||| 0
...

as you can see, it's much harder to think about a syntax glue grammar, and
it doesn't really add usefulness to the model. Hence the convenience 'X'
labels.



On 14 May 2014 08:58, J?rg Tiedemann <Jorg.Tiedemann@lingfil.uu.se> wrote:

>
> To follow up on the tracing problems. I added now the sourcePhrase
> feature function. My output is now like this:
>
> 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) sourcePhrase=X </s>
> 3.97252core=(0,-6,10,-3.48177,-5.5193,-2.44483,-2.63781,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) sourcePhrase=X X
> 2.83722core=(0,-5,9,-3.48177,-5.5193,-2.44483,-2.63781,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) sourcePhrase=X X
> 0.909388core=(0,-4,7,-3.09425,-4.70708,-1.94095,-2.16629,2.99969,-10.2172)
>
> which still includes the nonlinguistic labels X instead of the tree
> labels from my input sentence. Here is the input tree once again:
>
> <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>
>
> Did I miss something else that I have to set to obtain the source
> language labels used as constraints in decoding or is there something wrong
> with my example?
>
> Thanks again,
> J?rg
>
>
>
>
>
> 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 <tiedeman@gmail.com> 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
>> Moses-support@mit.edu
>> 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
> Moses-support@mit.edu
> http://mailman.mit.edu/mailman/listinfo/moses-support
>
>
> _______________________________________________
> Moses-support mailing list
> Moses-support@mit.edu
> http://mailman.mit.edu/mailman/listinfo/moses-support
>
>
>


--
Hieu Hoang
Research Associate
University of Edinburgh
http://www.hoang.co.uk/hieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/mailman/private/moses-support/attachments/20140514/d4ea5f41/attachment.htm

------------------------------

_______________________________________________
Moses-support mailing list
Moses-support@mit.edu
http://mailman.mit.edu/mailman/listinfo/moses-support


End of Moses-support Digest, Vol 91, Issue 18
*********************************************

0 Response to "Moses-support Digest, Vol 91, Issue 18"

Post a Comment