rsennrich/Bleualign

How to output an index file

Hyfred opened this issue · 1 comments

I want to know how to output an index file (record the original index of each sentence in the source or target output file.)
Because I want to trace where the sentence came from, and then merge it by the index accordingly according to the situation.
Thanks!

Hi Hyfred,

I added a similar functionality to the verbosity mode (use -v 2). It will print all the indices of the aligned pairs:

alignment: 0 - 0
alignment: 1 - 1
alignment: 2 - 2
alignment: 3 - 3
alignment: 4 - 4
alignment: 5 - 5
alignment: 6 - 6,7
alignment: 7 - 9
alignment: 8 - 10
alignment: 9 - 11
alignment: 10,11 - 13

hope this helps; if you need a nicer format, this commit should show you where to do it; I'm happy to accept pull requests.