• a cost function that takes a span of source sentences and a span of target sentences and returns a score measuring how likely these spans are to be translations. • an alignment algorithm that takes these scores to find a good alignment between the documents.