From 851e389dffdd6996ea32d70defb8906de80b9edc Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Mon, 14 Dec 2009 20:35:11 -0500 Subject: few small fixes of alignment tools, add new orthographic similarity feature for word aligner, final naming of directories, libraries in cdec --- src/ff_factory.cc | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 src/ff_factory.cc (limited to 'src/ff_factory.cc') diff --git a/src/ff_factory.cc b/src/ff_factory.cc deleted file mode 100644 index 1854e0bb..00000000 --- a/src/ff_factory.cc +++ /dev/null @@ -1,35 +0,0 @@ -#include "ff_factory.h" - -#include "ff.h" - -using boost::shared_ptr; -using namespace std; - -FFFactoryBase::~FFFactoryBase() {} - -void FFRegistry::DisplayList() const { - for (map >::const_iterator it = reg_.begin(); - it != reg_.end(); ++it) { - cerr << " " << it->first << endl; - } -} - -shared_ptr FFRegistry::Create(const string& ffname, const string& param) const { - map >::const_iterator it = reg_.find(ffname); - shared_ptr res; - if (it == reg_.end()) { - cerr << "I don't know how to create feature " << ffname << endl; - } else { - res = it->second->Create(param); - } - return res; -} - -void FFRegistry::Register(const string& ffname, FFFactoryBase* factory) { - if (reg_.find(ffname) != reg_.end()) { - cerr << "Duplicate registration of FeatureFunction with name " << ffname << "!\n"; - abort(); - } - reg_[ffname].reset(factory); -} - -- cgit v1.2.3