From 124878154b88819d35e78a42b854054bfc90e1b1 Mon Sep 17 00:00:00 2001 From: Paul Baltescu Date: Thu, 23 May 2013 20:41:17 +0100 Subject: Support completely unaligned sentences. --- extractor/alignment.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extractor/alignment.cc b/extractor/alignment.cc index 1aea34b3..f8326886 100644 --- a/extractor/alignment.cc +++ b/extractor/alignment.cc @@ -23,8 +23,8 @@ Alignment::Alignment(const string& filename) { boost::split(items, line, boost::is_any_of(" -")); vector > alignment; alignment.reserve(items.size() / 2); - for (size_t i = 0; i < items.size(); i += 2) { - alignment.push_back(make_pair(stoi(items[i]), stoi(items[i + 1]))); + for (size_t i = 1; i < items.size(); i += 2) { + alignment.push_back(make_pair(stoi(items[i - 1]), stoi(items[i]))); } alignments.push_back(alignment); } -- cgit v1.2.3