| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
|
|
| #ifndef moses_PhraseDictionaryInterpolated_h |
| #define moses_PhraseDictionaryInterpolated_h |
|
|
| #include <boost/shared_ptr.hpp> |
|
|
| #include "moses/TranslationModel/PhraseDictionary.h" |
| #include "moses/TranslationModel/PhraseDictionaryTreeAdaptor.h" |
|
|
| namespace Moses |
| { |
|
|
| |
| |
| |
| class PhraseDictionaryInterpolated : public PhraseDictionary |
| { |
| public: |
|
|
| PhraseDictionaryInterpolated |
| (size_t numScoreComponent,size_t numInputScores,const PhraseDictionaryFeature* feature); |
|
|
| virtual ~PhraseDictionaryInterpolated() { |
| delete m_targetPhrases; |
| } |
|
|
| |
| bool Load(const std::vector<FactorType> &input |
| , const std::vector<FactorType> &output |
| , const std::vector<std::string>& config |
| , const std::vector<float> &weight |
| , size_t tableLimit |
| , const LMList &languageModels |
| , float weightWP); |
|
|
| virtual TargetPhraseCollection::shared_ptr GetTargetPhraseCollection(const Phrase& src) const; |
| virtual void InitializeForInput(ttasksptr const& ttask); |
| virtual ChartRuleLookupManager *CreateRuleLookupManager( |
| const InputType &, |
| const ChartCellCollectionBase &) { |
| throw std::logic_error("PhraseDictionaryInterpolated.CreateRuleLookupManager() Not implemented"); |
| } |
|
|
| private: |
|
|
| typedef boost::shared_ptr<PhraseDictionaryTreeAdaptor> DictionaryHandle; |
| std::vector<DictionaryHandle> m_dictionaries; |
| std::vector<std::vector<float> > m_weights; |
| mutable TargetPhraseCollection::shared_ptr m_targetPhrases; |
| std::vector<float> m_weightT; |
| size_t m_tableLimit; |
| const LMList* m_languageModels; |
| float m_weightWP; |
|
|
| }; |
|
|
|
|
| } |
|
|
| #endif |
|
|