summaryrefslogtreecommitdiff
path: root/decoder
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-16 01:56:17 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-16 01:56:17 +0000
commit1671e12ef0b069a5d2ae1c2d4fea20b9b1087af3 (patch)
tree1518f8d42839d0039a9546cf3b06e1e976c8468a /decoder
parent4037e35c511aec96f780276aa4e3c1493e19eba1 (diff)
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
Diffstat (limited to 'decoder')
-rw-r--r--decoder/Makefile.am3
-rw-r--r--decoder/cdec_ff.cc2
-rw-r--r--decoder/ff_factory.h2
-rwxr-xr-xdecoder/oracle_bleu.h1
4 files changed, 4 insertions, 4 deletions
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<WordPenalty>);
global_ff_registry->Register(new FFFactory<SourceWordPenalty>);
global_ff_registry->Register(new FFFactory<ArityPenalty>);
- global_ff_registry->Register("BLEUModel", new FFFactory<BLEUModel>);
+ global_ff_registry->Register(new FFFactory<BLEUModel>);
global_ff_registry->Register("RuleShape", new FFFactory<RuleShapeFeatures>);
global_ff_registry->Register("RelativeSentencePosition", new FFFactory<RelativeSentencePosition>);
global_ff_registry->Register("Model2BinaryFeatures", new FFFactory<Model2BinaryFeatures>);
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<std::string, boost::shared_ptr<FFFactoryBase> > 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<std::string>() << "/kbest_"<<suffix<< "." << sent_id;
DumpKBest(sent_id, forest, k, unique, kbest_string_stream.str());
-
}
};