blob: 226059961286b43af418809dc1036b581c3f1338 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#pragma once
#include "moses/PP/PhraseProperty.h"
#include <string>
#include <boost/shared_ptr.hpp>
#include <boost/unordered_map.hpp>
namespace Moses
{
class PhrasePropertyCreator;
class PhrasePropertyFactory
{
public:
PhrasePropertyFactory();
~PhrasePropertyFactory();
boost::shared_ptr<PhraseProperty> ProduceProperty(const std::string &key, const std::string &value) const;
void PrintPP() const;
private:
void Add(const std::string &name, PhrasePropertyCreator *creator);
typedef boost::unordered_map<std::string, boost::shared_ptr<PhrasePropertyCreator> > Registry;
Registry m_registry;
};
} // namespace Moses
|