Hi all, We are trying to update feature weights dynamically during decoding. We are doing this by adding additional lines of input, delimited with a special token to tell Moses to update weights.
For example, ---- First sentence. @CMD@ weight-l=0.5 Change the LM weight for this sentence. ---- While debugging our new code, we noticed that several lines of the input were read before being translated. For instance, this is the input file: sentence0 @CMD@ weight-l=0.5 sentence1 @CMD@ weight-l=0.3 sentence2 Whenever a @CMD@ line is read, we execute the corresponding command to change the weights. So we would expect all three sentences to be translated with different weights. Instead what happens is that all the commands are executed before translating *any* sentence, so that all sentences are translated with the last modified weights (i.e weight-l=0.3) This happens when the inputfile is given as an argument (to -i) and also when it is read from the stdin. Only if we type the lines to the console one by one do we get the expected result. Is there any way to force Moses to read and process each line at a time? -- Prashant Mathur, Arianna Bisazza, Nick Ruiz PhD Student FBK via Sommarive 18, Povo Trento _______________________________________________ Moses-support mailing list [email protected] http://mailman.mit.edu/mailman/listinfo/moses-support
