Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'moses2/TranslationModel')
-rw-r--r--moses2/TranslationModel/MSPT/MSPT.cpp11
-rw-r--r--moses2/TranslationModel/MSPT/MSPT.h2
2 files changed, 8 insertions, 5 deletions
diff --git a/moses2/TranslationModel/MSPT/MSPT.cpp b/moses2/TranslationModel/MSPT/MSPT.cpp
index 17dea92a0..8d33071f6 100644
--- a/moses2/TranslationModel/MSPT/MSPT.cpp
+++ b/moses2/TranslationModel/MSPT/MSPT.cpp
@@ -28,6 +28,7 @@
#include "../../SCFG/Stacks.h"
#include "../../SCFG/Manager.h"
+#include "../../PhraseBased/SentenceWithCandidates.h"
using namespace std;
@@ -152,14 +153,16 @@ MSPT::~MSPT()
// }
-void MSPT::InitializeForInput(const InputType &input)
+void MSPT::InitializeForInput(const System &system, const InputType &input)
{
cerr << "InitializeForInput MSPT" << endl;
+ cerr << &input << endl;
// downcast to SentenceWithCandidates
- const SentenceWithCandidates& inputObj = dynamic_cast<const SentenceWithCandidates&>(input);
- cerr << "Casting done." << endl;
- // cerr << "PhraseTableString member: " << inputObj.getPhraseTableString() << endl;
+ //const SentenceWithCandidates *inputObj = static_cast<const SentenceWithCandidates*>(&input);
+ const SentenceWithCandidates* inputObj = dynamic_cast<const SentenceWithCandidates*>(&input);
+ cerr << "Casting done." << endl << flush;
+ cerr << "PhraseTableString member: " << inputObj->getPhraseTableString() << endl;
}
diff --git a/moses2/TranslationModel/MSPT/MSPT.h b/moses2/TranslationModel/MSPT/MSPT.h
index 165565791..b3ff99c91 100644
--- a/moses2/TranslationModel/MSPT/MSPT.h
+++ b/moses2/TranslationModel/MSPT/MSPT.h
@@ -65,7 +65,7 @@ public:
const SCFG::Stacks &stacks,
SCFG::InputPath &path) const;
- virtual void InitializeForInput(const InputType &input);
+ virtual void InitializeForInput(const System &system, const InputType &input);
protected:
PBNODE *m_rootPb;