title: How to use multiple corpora files to use as parallel corpora in Watson Language Translator in Python
body: <p>The Watson Language Translator documentation says:</p>
  
  <p>"A TMX file with parallel sentences for source and target language. You can upload multiple parallel_corpus files in one request. All uploaded parallel_corpus files combined, your parallel corpus must contain at least 5,000 parallel sentences to train successfully."</p>
  
  <p>I have a number of corpora files which I would use to train my translation model. I've looked up possible ways to do so programmatically with no success.</p>
  
  <p>The only way I found to do so is by merging them manually into one single file.</p>
  
  <p>Is there any way to send several files as parallel corpus via the API?</p>
  
  <p>Can you provide examples in Python or Curl?</p>
  
  <p>Thanks.</p>
  
  <p>The only thing which worked just yest is aggregating the .TMX files manually and sending just one file. I have not found any way of sending several files as parallel_corpora</p>
  
  <pre><code>with open("./training/my_corpus_SPA.TMX", "rb") as parallel:
  custom_model = language_translation.create_model(
  base_model_id = 'en-es',
  name = 'en-es-base1xx',
  #forced_glossary = glossary,
  parallel_corpus = parallel).get_result()
  print(json.dumps(custom_model, indent=2))
  </code></pre>