From 06a90130833d695b588170495e20c3443431c1e7 Mon Sep 17 00:00:00 2001 From: graehl Date: Fri, 16 Jul 2010 01:56:17 +0000 Subject: refactor vest mapper input; --optimize_feature (s) should now limit non-oracle directions git-svn-id: https://ws10smt.googlecode.com/svn/trunk@273 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/Makefile.am | 3 ++- decoder/cdec_ff.cc | 2 +- decoder/ff_factory.h | 2 +- decoder/oracle_bleu.h | 1 - 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'decoder') diff --git a/decoder/Makefile.am b/decoder/Makefile.am index e7b6abd8..a34aba1a 100644 --- a/decoder/Makefile.am +++ b/decoder/Makefile.am @@ -13,7 +13,7 @@ noinst_PROGRAMS = \ small_vector_test endif -cdec_SOURCES = cdec.cc forest_writer.cc maxtrans_blunsom.cc cdec_ff.cc ff_factory.cc timing_stats.cc +cdec_SOURCES = cdec.cc forest_writer.cc maxtrans_blunsom.cc cdec_ff.cc timing_stats.cc small_vector_test_SOURCES = small_vector_test.cc small_vector_test_LDADD = $(GTEST_LDFLAGS) $(GTEST_LIBS) libcdec.a parser_test_SOURCES = parser_test.cc @@ -75,6 +75,7 @@ libcdec_a_SOURCES = \ ff_csplit.cc \ ff_tagger.cc \ ff_bleu.cc \ + ff_factory.cc \ ../vest/scorer.cc \ ../vest/ter.cc \ ../vest/aer_scorer.cc \ diff --git a/decoder/cdec_ff.cc b/decoder/cdec_ff.cc index c91780e2..069e07f1 100644 --- a/decoder/cdec_ff.cc +++ b/decoder/cdec_ff.cc @@ -21,7 +21,7 @@ void register_feature_functions() { global_ff_registry->Register(new FFFactory); global_ff_registry->Register(new FFFactory); global_ff_registry->Register(new FFFactory); - global_ff_registry->Register("BLEUModel", new FFFactory); + global_ff_registry->Register(new FFFactory); global_ff_registry->Register("RuleShape", new FFFactory); global_ff_registry->Register("RelativeSentencePosition", new FFFactory); global_ff_registry->Register("Model2BinaryFeatures", new FFFactory); diff --git a/decoder/ff_factory.h b/decoder/ff_factory.h index 75911f38..6f86f2f9 100644 --- a/decoder/ff_factory.h +++ b/decoder/ff_factory.h @@ -21,8 +21,8 @@ class FFRegistry { void DisplayList() const; void Register(const std::string& ffname, FFFactoryBase* factory); void Register(FFFactoryBase* factory); - private: FFRegistry() {} + private: std::map > reg_; }; diff --git a/decoder/oracle_bleu.h b/decoder/oracle_bleu.h index 32525466..5fef53fd 100755 --- a/decoder/oracle_bleu.h +++ b/decoder/oracle_bleu.h @@ -195,7 +195,6 @@ struct OracleBleu { std::ostringstream kbest_string_stream; kbest_string_stream << conf["forest_output"].as() << "/kbest_"<