question: public String toFinalString ( ) { final StringBuilder sb = new StringBuilder ( ) ; int t = 0 ; for ( AlignedSourceTokens pt : trgPoints ) { for ( int s : pt ) { sb . append ( String . format ( " %d-%d" , s - 1 , t - 1 ) ) ; } t ++ ; } final String result = sb . toString ( ) ; if ( ! result . isEmpty ( ) ) { return result . substring ( 1 ) ; } return result ; }
target:  builds the final alignment string in the standard alignment format: src - trg. Sorted by trg indexes. Disregards the sentence markers.