     std::ifstream file(path);
     std::string line;
     while (std::getline(file, line).good()) {
-        output.push_back(Split(line, " ||| "));
+      boost::trim(line);
+      output.push_back(Split(line, " ||| "));
     }
 }
 

  decoder.EmptyState(PrevState, SourceContext, batchSize);
  decoder.EmptyEmbedding(PrevEmbedding, batchSize);

  std::vector<float> scores(batch[0].size(), 0.0f);
  size_t lengthIndex = 0;
  for (auto& w : batch) {
    decoder.GetProbs(Probs, AlignedSourceContext,


std::vector<std::string> Split(std::string& line, std::string del=" ") {
    std::vector<std::string> output;
    boost::trim(line);
    size_t pos = 0;
    std::string token;
    while ((pos = line.find(del)) != std::string::npos) {
