mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2025-01-06 19:49:41 +03:00
move default factory into cpp file
This commit is contained in:
parent
15072646e2
commit
7a07308041
@ -19,7 +19,27 @@ using namespace std;
|
||||
|
||||
namespace Moses2
|
||||
{
|
||||
template <class F>
|
||||
class DefaultFeatureFactory : public FeatureFactory
|
||||
{
|
||||
public:
|
||||
FeatureFunction *Create(size_t startInd, const std::string &line) {
|
||||
return new F(startInd, line);
|
||||
}
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
class KenFactory : public FeatureFactory
|
||||
{
|
||||
public:
|
||||
void Create(size_t startInd, const std::string &line) {
|
||||
//ConstructKenLM(line);
|
||||
}
|
||||
};
|
||||
*/
|
||||
////////////////////////////////////////////////////////////////////
|
||||
FeatureRegistry::FeatureRegistry()
|
||||
{
|
||||
// Feature with same name as class
|
||||
|
@ -18,16 +18,6 @@ protected:
|
||||
FeatureFactory() {}
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
template <class F>
|
||||
class DefaultFeatureFactory : public FeatureFactory
|
||||
{
|
||||
public:
|
||||
FeatureFunction *Create(size_t startInd, const std::string &line) {
|
||||
return new F(startInd, line);
|
||||
}
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
class FeatureRegistry
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user