summaryrefslogtreecommitdiff
path: root/extractor
diff options
context:
space:
mode:
authorPaul Baltescu <pauldb89@gmail.com>2013-03-09 00:29:09 +0000
committerPaul Baltescu <pauldb89@gmail.com>2013-03-09 00:29:09 +0000
commit65a67c6921ee6da0477531224effe38559739455 (patch)
tree36049f25f962048fc88503d9591512761c1b597e /extractor
parente0e5bd087ec34bf6097a58eb40be0bd3496e83a9 (diff)
Fix output order.
Diffstat (limited to 'extractor')
-rw-r--r--extractor/run_extractor.cc5
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());