From 65a67c6921ee6da0477531224effe38559739455 Mon Sep 17 00:00:00 2001 From: Paul Baltescu Date: Sat, 9 Mar 2013 00:29:09 +0000 Subject: Fix output order. --- extractor/run_extractor.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'extractor') diff --git a/extractor/run_extractor.cc b/extractor/run_extractor.cc index e18336af..dba4578c 100644 --- a/extractor/run_extractor.cc +++ b/extractor/run_extractor.cc @@ -189,11 +189,12 @@ int main(int argc, char** argv) { } string sentence; - vector sentences, suffixes; + vector sentences; while (getline(cin, sentence)) { sentences.push_back(sentence); } + vector suffixes(sentences.size()); #pragma omp parallel for schedule(dynamic) \ num_threads(vm["threads"].as()) for (size_t i = 0; i < sentences.size(); ++i) { @@ -203,7 +204,7 @@ int main(int argc, char** argv) { suffix = sentences[i].substr(position); sentences[i] = sentences[i].substr(0, position); } - suffixes.push_back(suffix); + suffixes[i] = suffix; Grammar grammar = extractor.GetGrammar(sentences[i]); ofstream output(GetGrammarFilePath(grammar_path, i).c_str()); -- cgit v1.2.3