Hi,
Moses treats <s> and </s> as normal words that are implicitly added to
the input and stripped from the output. Let's start by interpreting the
rules.
<s> [X] ||| <s> [S] ||| 1 ||| ||| 0
X:S -> <s> with feature value 0
This consumes <s> and converts it to non-terminal X:S.
[X][S] [X][X] [X] ||| [X][S] [X][X] [S] ||| 2.718 ||| 0-0 1-1 ||| 0
X:S -> S:X X:X with feature value 1
This takes an existing X:S and glues a constituent X:X to the right.
[X][S] </s> [X] ||| [X][S] </s> [S] ||| 1 ||| 0-0 ||| 0
S:X -> S:X </s> with feature value 0
This completes gluing by consuming the </s> word.
Note that rule structure naturally requires that gluing begin at the
left and end at the right. This prevents S:X from appearing in useless
locations.
It also means that all glued hypotheses begin with <s> and therefore
have empty left language model state. This permits more recombination than
GOAL -> <s> S </s>
S -> X
S -> X X
which would glue hypotheses then inform them that they begin with <s>.
As a side effect, glued hypotheses exist separate chart cells from
other hypotheses. Therefore they do not compete for pop limit with
other chart cells.
When cdec and Joshua were modified to use Moses-style glue, model
scores improved.
Since Moses counts <s> and </s> as words, these are included in
WordPenalty. The glue feature counts how many X:X constituents were
glued together. This is the meaning of the 2.718 (which is 1 after
Moses takes the log) versus 1 (which maps to 0).
I'm not sure what features could be added to the glue rules beyond the
number of glue rule applications. But if you want to, they're standard
Moses grammar rules so you can always insert a number alongside the 1
and 2.718 in the third field. Just make sure you have the same number
of features for every rule.
Also see footnote 4 on page 8 of
http://kheafield.com/professional/edinburgh/search_paper.pdf .
Kenneth
On 07/17/13 18:13, xiaofeng wu wrote:
> Can anybody tell me what the exact meaning of the moses hp 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
>
> I can't not link these symbols with David Chiang's
> S->(S1X2,S1X2) and S->(X1,X1), and, If I want to add probability to
> these rules, how?
>
> Best
> --
> Xiaofeng
>
>
>
> _______________________________________________
> 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