From 0900cac418f7e46889336d137e6ba1bb84651544 Mon Sep 17 00:00:00 2001 From: "Wu, Ke" Date: Tue, 7 Oct 2014 18:05:58 -0400 Subject: Add ConstReorderFeature --- decoder/cdec_ff.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'decoder/cdec_ff.cc') diff --git a/decoder/cdec_ff.cc b/decoder/cdec_ff.cc index 7f7e075b..e7a8bbc1 100644 --- a/decoder/cdec_ff.cc +++ b/decoder/cdec_ff.cc @@ -3,6 +3,7 @@ #include "ff.h" #include "ff_basic.h" #include "ff_context.h" +#include "ff_const_reorder.h" #include "ff_spans.h" #include "ff_lm.h" #include "ff_klm.h" @@ -77,6 +78,6 @@ void register_feature_functions() { ff_registry.Register("WordPairFeatures", new FFFactory); ff_registry.Register("SourcePathFeatures", new FFFactory); ff_registry.Register("WordSet", new FFFactory); + ff_registry.Register("ConstReorderFeature", new ConstReorderFeatureFactory()); ff_registry.Register("External", new FFFactory); } - -- cgit v1.2.3 From 435ebca6bd25819d263cc522f76e284d803c2110 Mon Sep 17 00:00:00 2001 From: "Wu, Ke" Date: Fri, 10 Oct 2014 17:33:51 -0400 Subject: Remove ConstReorderFeatureFactory --- decoder/cdec_ff.cc | 2 +- decoder/ff_const_reorder.cc | 9 --------- decoder/ff_const_reorder.h | 5 ----- 3 files changed, 1 insertion(+), 15 deletions(-) (limited to 'decoder/cdec_ff.cc') diff --git a/decoder/cdec_ff.cc b/decoder/cdec_ff.cc index e7a8bbc1..6f7227aa 100644 --- a/decoder/cdec_ff.cc +++ b/decoder/cdec_ff.cc @@ -78,6 +78,6 @@ void register_feature_functions() { ff_registry.Register("WordPairFeatures", new FFFactory); ff_registry.Register("SourcePathFeatures", new FFFactory); ff_registry.Register("WordSet", new FFFactory); - ff_registry.Register("ConstReorderFeature", new ConstReorderFeatureFactory()); + ff_registry.Register("ConstReorderFeature", new FFFactory); ff_registry.Register("External", new FFFactory); } diff --git a/decoder/ff_const_reorder.cc b/decoder/ff_const_reorder.cc index 96fc5f56..d29820ef 100644 --- a/decoder/ff_const_reorder.cc +++ b/decoder/ff_const_reorder.cc @@ -1372,12 +1372,3 @@ boost::shared_ptr CreateConstReorderModel( ConstReorderFeature* ret = new ConstReorderFeature(param); return boost::shared_ptr(ret); } - -boost::shared_ptr ConstReorderFeatureFactory::Create( - std::string param) const { - return CreateConstReorderModel(param); -} - -std::string ConstReorderFeatureFactory::usage(bool params, bool verbose) const { - return ConstReorderFeature::usage(params, verbose); -} diff --git a/decoder/ff_const_reorder.h b/decoder/ff_const_reorder.h index 5079486f..a5be02d0 100644 --- a/decoder/ff_const_reorder.h +++ b/decoder/ff_const_reorder.h @@ -40,9 +40,4 @@ class ConstReorderFeature : public FeatureFunction { ConstReorderFeatureImpl* pimpl_; }; -struct ConstReorderFeatureFactory : public FactoryBase { - FP Create(std::string param) const; - std::string usage(bool params, bool verbose) const; -}; - #endif /* FF_CONST_REORDER_H_ */ -- cgit v1.2.3