please subscribe to the Moses mailing list before posting to it. You can subscribe here:
   http://mailman.mit.edu/mailman/admin/moses-support
To answer you question - the target phrase has a method called
   GetAlignTerm()
that contains the alignment for terminals. This comes from the phrase-table, and ultimately from the word alignment.

-------- Forwarded Message --------
Subject: Moses-support post from [email protected] requires approval
Date:   Wed, 13 Jan 2016 23:36:50 -0500
From:   [email protected]
To:     [email protected]



As list administrator, your authorization is requested for the
following mailing list posting:

    List:    [email protected]
    From:    [email protected]
    Subject: Getting alignments for current hypothesis in phrase based model
    Reason:  Post by non-member to a members-only list

At your convenience, visit:

    http://mailman.mit.edu/mailman/admindb/moses-support
to approve or deny the request.



--- Begin Message ---
Hi,

I'm trying to add source side information in my feature function for phrase 
based model. For this purpose I am implementing a StatefulFeatureFunction and 
in that I'm adding my code to the EvaluateWhenApplied(const Hypothesis& 
cur_hypo, const FFState* prev_state, ScoreComponentCollection* accumulator) 
function.

For adding the source side information, I am able to get the source sentence 
from the Manager object (I get the Manager object from the Hypothesis object). 
I also have the current target phrase from the Hypothesis object. Is it 
possible to get alignment information here for the current target phrase? I 
specifically want to know which words in the current target phrase are aligned 
to which words in the source sentence.

>From my initial search, I can get the AlignmentInfo object from 
>cur_hypo.GetCurrTargetPhrase().GetAlignTerm() or 
>cur_hypo.GetCurrTargetPhrase().GetAlignNonTerm(). But, I'm not sure which of 
>these would be useful in my case.

Any information would be greatly appreciated.

Thanks,
Jasneet


--- End Message ---
--- Begin Message ---
If you reply to this message, keeping the Subject: header intact,
Mailman will discard the held message.  Do this if the message is
spam.  If you reply to this message and include an Approved: header
with the list password in it, the message will be approved for posting
to the list.  The Approved: header can also appear in the first line
of the body of the reply.

--- End Message ---
_______________________________________________
Moses-support mailing list
[email protected]
http://mailman.mit.edu/mailman/listinfo/moses-support

Reply via email to