     if (num_target_tokens < 0 || target_ids.size() > num_target_tokens) {
       num_target_tokens = target_ids.size();
     }
-    if (source_sentences.size() == 1000) break;
+    //if (source_sentences.size() == 1000) break;
   }
   std::cerr << "Done." << std::endl;
   std::cerr << source_sentences.size()

        std::vector<float> values(batch_size * source_vocab.Size(), 0.0);
        int k = 0;
        for (int i = 0; i < batch_size; ++i) {
          values[k + source_sentences[i + j*batch_size][t]] = 1.0;
          k += source_vocab.Size();
        }
        thrust::copy(values.begin(), values.end(), Xt.begin());

using namespace marian;
using namespace keywords;

void random_permutation(int n, std::vector<size_t> *indices) {
  std::srand(std::time(0));
  indices->clear();
  for(size_t i = 0; i < n; ++i) {
    indices->push_back(i);
  }
  std::random_shuffle(indices->begin(), indices->end());
}

ExpressionGraph build_graph(int source_vocabulary_size,
                            int target_vocabulary_size,
                            int embedding_size,
