Hi,
Yes, you need to calculate the absolute position by adding up the start
position of the current rule application, the relative index within the
rule, and the span width of any right-hand side non-terminals in the
current rule with a smaller source index.
As Rico noted, you'll find some simila
Hi Amir,
There is currently no method that returns this, but BilingualLM
(moses/LM/BilingualLM) calculates and uses the absolute source position
of each terminal - search for absolute_source_position.
best wishes,
Rico
On 20/06/15 14:35, amir haghighi wrote:
Thanks Matthias
ChartHypothesis:
Thanks Matthias
ChartHypothesis::GetCurrSourceRange() gets the source span that all
terminals and non terminals in the current hypothesis cover in the source
sentence. I'd like to know which terminals (non terminals) are corresponded
to which source word's index in the source. Could you guide me ho
Hi,
You can calculate absolute positions in the source sentence based on the
words range of the current hypothesis and those of the direct
predecessors (in case of right-hand side non-terminals).
Take a look at these methods:
InputPath::GetWordsRange()
ChartHypothesis::GetCurrSou
Hi everybody
I wrote the following code to get an ordered list from the source words
inside a hypothesis. It gets the words in their translation order, but I
need not only the words' strings, but also the index of each word in the
original sentence.
could you please help me how to get the index