hi ales every hypothesis has a reference to manager. And every manager has a pointer to InputType const& m_source; the hypothesis has a variable m_currSourceWordsRange which tells you the source phrase span.
I would avoid using TargetPhrase::m_sourcePhrase. This was a hack for confusion network/lattice decoding and is overdue for a cleanup On 28/06/2012 18:21, Ales Tamchyna wrote: > Hi, > > I'm implementing a stateless feature function (for the phrase-based > decoder) and I encountered several problems. Is it possible to get the > source sentence and source phrase span somehow? The feature (phrase > sense disambiguation) depends on the context of the source phrase. > > If it's not possible, would it make sense to add an additional interface > for context-dependent stateless functions? I'm also wondering if anyone > else would benefit from an interface that would allow scoring all > translation options of a source phrase at once. (We would, but we can > work around it by caching etc.) > > Also, is there a reason why scores by stateless features are computed > during decoding? If they were computed for each translation option ahead > of time (once full translation options are created), the decoder could > use them in the initial pruning. It could also prevent repeated > computation of feature function values (e.g. our feature is costly to > compute). > > Thanks! > > Ales Tamchyna > _______________________________________________ > 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
