diff options
author | Paul Baltescu <pauldb89@gmail.com> | 2013-03-09 00:29:09 +0000 |
---|---|---|
committer | Paul Baltescu <pauldb89@gmail.com> | 2013-03-09 00:29:09 +0000 |
commit | 1b9ca189fd0549bd6d969edf618f92ea59184b12 (patch) | |
tree | e893efcfdaf009ca9c8b4d9c3d8b52f36ae8439d | |
parent | b77cdc3bdec50cd77dff1e1ddc71db43e2ef8e0f (diff) |
Fix output order.
-rw-r--r-- | extractor/run_extractor.cc | 5 |
1 files changed, 3 insertions, 2 deletions
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<string> sentences, suffixes; + vector<string> sentences; while (getline(cin, sentence)) { sentences.push_back(sentence); } + vector<string> suffixes(sentences.size()); #pragma omp parallel for schedule(dynamic) \ num_threads(vm["threads"].as<int>()) 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()); |