question: public WordAlignmentState ( final Rule rule , final int start ) { trgPoints = new LinkedList < > ( ) ; srcLength = rule . getFrench ( ) . length ; numNT = rule . getArity ( ) ; srcStart = start ; final Map < Integer , List < Integer > > alignmentMap = rule . getAlignmentMap ( ) ; final int [ ] nonTerminalSourcePositions = rule . getNonTerminalSourcePositions ( ) ; final int [ ] trg = rule . getEnglish ( ) ; for ( int trgIndex = 0 ; trgIndex < trg . length ; trgIndex ++ ) { final AlignedSourceTokens trgPoint = new AlignedSourceTokens ( ) ; if ( trg [ trgIndex ] >= 0 ) { if ( alignmentMap . containsKey ( trgIndex ) ) { for ( int srcIdx : alignmentMap . get ( trgIndex ) ) { trgPoint . add ( srcStart + srcIdx ) ; } } else { trgPoint . setNull ( ) ; } } else { trgPoint . setNonTerminal ( ) ; final int absoluteNonTerminalSourcePosition = srcStart + nonTerminalSourcePositions [ Math . abs ( trg [ trgIndex ] ) - 1 ] ; trgPoint . add ( absoluteNonTerminalSourcePosition ) ; } trgPoints . add ( trgPoint ) ; } }
target:  construct AlignmentState object from a virgin Rule and its source span. Determines if state is complete (if no NT present)