On 10/12/14 08:11, amir haghighi wrote:
Hi everyone

I'm implementing a feature function in moses-chart. I need the source words string and also their indexes in the source sentence. I've written a function that gets the source words but I don't know how extract word string from a word. could anyone guide me how to do that? as I know, each word is implemented as an array of factors, which of them is its string?

I have also some questions about the states in the stateful features,
what kind of variables should be stored in each state? only those ones that should be used in the compare function? or any variable from the previous hypothesis that we use in our feature?
You can store anything in the state information that will help you to calculate function
   FFState::Compare(other)
This is the only function you need to implement. The example
   SkeletonStatefulFF
class compares the length of the target side of the translation rule from 2 hypotheses, therefore, it the state only need to store the length of the target string, not the entire string.

It 2 states are the same Compare() should return 0. If 2 states are different, then it should return -1 or +1. you MUST make sure if, ie.
  if a > b and b > c
then a > c

and
  if a > b
  then b < a

Thanks in advance!

Cheers
Amir


_______________________________________________
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

Reply via email to