diff options
author | Paul Baltescu <pauldb89@gmail.com> | 2013-11-24 13:19:28 +0000 |
---|---|---|
committer | Paul Baltescu <pauldb89@gmail.com> | 2013-11-25 17:54:09 +0000 |
commit | 3973a7e4a8302b4a02fee7d2950bb469b37e2452 (patch) | |
tree | 8e76b5492648aa95bab6ecc915dd35e7514c1c07 /extractor/run_extractor.cc | |
parent | 79206291f78fba893fda6a61ff0ae9264d00bb82 (diff) |
Reduce memory overhead for constructing the intersector.
Diffstat (limited to 'extractor/run_extractor.cc')
-rw-r--r-- | extractor/run_extractor.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/extractor/run_extractor.cc b/extractor/run_extractor.cc index 6eb55073..85c8a422 100644 --- a/extractor/run_extractor.cc +++ b/extractor/run_extractor.cc @@ -28,6 +28,7 @@ #include "suffix_array.h" #include "time_util.h" #include "translation_table.h" +#include "vocabulary.h" namespace fs = boost::filesystem; namespace po = boost::program_options; @@ -142,11 +143,14 @@ int main(int argc, char** argv) { cerr << "Reading alignment took " << GetDuration(start_time, stop_time) << " seconds" << endl; + shared_ptr<Vocabulary> vocabulary = make_shared<Vocabulary>(); + // Constructs an index storing the occurrences in the source data for each // frequent collocation. start_time = Clock::now(); cerr << "Precomputing collocations..." << endl; shared_ptr<Precomputation> precomputation = make_shared<Precomputation>( + vocabulary, source_suffix_array, vm["frequent"].as<int>(), vm["super_frequent"].as<int>(), @@ -194,6 +198,7 @@ int main(int argc, char** argv) { alignment, precomputation, scorer, + vocabulary, vm["min_gap_size"].as<int>(), vm["max_rule_span"].as<int>(), vm["max_nonterminals"].as<int>(), |