title: How to generate alignments for word-based translation models if number of words are different in both sentences
body: <p>I am working on implementing IBM Model 1. I have a parallel corpus of some 2,000,000 sentences (English to Dutch). Also, the sentences of the two docs are already aligned. The aim is to translate a Dutch sentence into English and vice-versa.</p>
  
  <p>The code I am using for generating the alignments is:</p>
  
  <pre class="lang-py prettyprint-override"><code>A = pair_sent[0].split()  # To split English sentence
  B = pair_sent[1].split()  # To split Dutch sentence
  trips.append([zip(A, p) for p in product(B, repeat=len(A))])
  </code></pre>
  
  <p>Now, there are pair sentences with an unequal number of words (like 10 in English and 14 in its Dutch Translation). Our professor told us that we should use NULLs or drop a word. But I don't understand how to do that? Where to insert NULL and how to choose which word to drop.</p>
  
  <p>In the end, I require the pair of sentences to have the equal number of words.</p>