title: How to build a 4language dictionary from bilingual dictionaries
body: <p>3 days ago I asked a question about building a parallel dictionary which has 3 languages: <a href="https://stackoverflow.com/questions/11135928/removing-differencies-of-some-text-pairs">removing differencies of some text pairs</a></p>
  
  <p>The question was as follows:
   I have 2 pair of files by the following characteristics: pair1: (File1.txt , File2.txt) pair2: (File3.txt , File4.txt)</p>
  
  <p>There is a line by line correspondence between each files in these pairs. say that File1.txt and File3.txt are some English words, and File2.txt and File4.txt are their Arabic and French translations respectively. In addition, File1.txt and File3.txt are very similar (and in some cases the same).</p>
  
  <pre><code>
      File1.txt       File2.txt
      EnWord1         ArTrans1
      EnWord2         ArTrans2
      EnWord3         ArTrans3
      Enword4         ArTrans4
  
      File3.txt       File4.txt
      EnWord1         FrTrans1
      EnWord3         FrTrans3
      Enword4         FrTrans4
      Enword5         FrTrans5
  </code></pre>
  
  <p>What I wanted to do then, was to compare English sides of the pairs, find the common words that appear in both files (EnWord1,EnWord3, and EnWord4) and filter out their corresponding translations.
  In short, I can say that using two bilingual English-Arabic and English French dictionaries, I am trying to build a 3-lingual English-Arabic-French dictionary.</p>
  
  <p>Steve answered me and wrote a nice code to find duplicated English words and remove others and their translations: <a href="https://stackoverflow.com/a/11141345/1265960">The answer could be found here</a></p>
  
  <p>But I still have a bit more complicated question:
  What should I do, if I want to add another language? I mean that I have another English-Russian dictionary (Say File5.txt contains English entities, and File6.txt contains Russian entities) and I want to build a 4-language dictionary instead of a 3-language one.</p>
  
  <p>one way is to build a 3-language dictionary using the current code, and then by rerunning it on a new language pair, build a 4-language dictionary. but I think it is not efficient enough, and it would be better solution to this problem. It also may bring in some inconsistencies in other languages.
  My main challenge is checking the duplications: when have just 2 language pairs, it would be very easy to check the duplications. But what should I do if I want to check the duplications in 3 pairs?
  How can I change the code to be able to extract 4language dictionary in just one pass?</p>