i get ya. You can do
EvaluateWhenApplied(Hypothesis cur_hypo, FFState,
ScoreComponenetCollection) {
If (cur_hypo.GetCurrSourceWordsRange() == NOT_FOUND) then {
LMState = CoarseLM->BeginSentenceState()
}
}
or
EvaluateWhenApplied(Hypothesis cur_hypo, FFState,
ScoreComponenetCollection) {
If (cur_hypo.GetWordsBitmap().GetNumWordsCovered() == 0) then {
LMState = CoarseLM->BeginSentenceState()
}
}
Each FF can also override
InitializeForInput()
This might not be suitable for you on this occasion, but it's worth
bearing in mind
On 09/03/2016 23:20, Jasneet Sabharwal wrote:
Hi Hieu,
Thanks for replying. For example:
EvaluateWhenApplied(Hypothesis, FFState, ScoreComponenetCollection) {
If (processing a new source sentence), then {
LMState = CoarseLM->BeginSentenceState()
}
}
Here, I am trying to check if I am processing a new source sentence,
so I should reset my language model states that I calling from my
feature function.
Does this give an idea of what I am trying to do?
Regards,
Jasneet
On Mar 9, 2016, at 2:51 PM, Hieu Hoang <[email protected]
<mailto:[email protected]>> wrote:
can you give an example
Hieu Hoang
http://www.hoang.co.uk/hieu
On 9 March 2016 at 22:36, Jasneet Sabharwal <[email protected]
<mailto:[email protected]>> wrote:
Hi Everyone,
I have added a feature function in Moses. Is it possible to know
through the Hypothesis parameter in “EvaluateWhenApplied”
function that I am now processing the first state in a new source
sentence. I would like to reset certain states whenever we start
translating a new source sentence.
Thank you for the help.
Regards,
Jasneet
_______________________________________________
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