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 'contrib/moses2/PhraseBased/Manager.h')
-rw-r--r--contrib/moses2/PhraseBased/Manager.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/contrib/moses2/PhraseBased/Manager.h b/contrib/moses2/PhraseBased/Manager.h
new file mode 100644
index 000000000..3f42d6b27
--- /dev/null
+++ b/contrib/moses2/PhraseBased/Manager.h
@@ -0,0 +1,77 @@
+/*
+ * Manager.h
+ *
+ * Created on: 23 Oct 2015
+ * Author: hieu
+ */
+
+#pragma once
+
+#include <queue>
+#include <cstddef>
+#include <string>
+#include <deque>
+#include "../ManagerBase.h"
+#include "../Phrase.h"
+#include "../TargetPhrase.h"
+#include "../MemPool.h"
+#include "../Recycler.h"
+#include "../EstimatedScores.h"
+#include "../legacy/Bitmaps.h"
+#include "InputPaths.h"
+
+namespace Moses2
+{
+
+class System;
+class TranslationTask;
+class PhraseImpl;
+class TargetPhraseImpl;
+class SearchNormal;
+class Search;
+class Hypothesis;
+class Sentence;
+class OutputCollector;
+
+class Manager: public ManagerBase
+{
+public:
+ Manager(System &sys, const TranslationTask &task, const std::string &inputStr,
+ long translationId);
+
+ virtual ~Manager();
+
+ Bitmaps &GetBitmaps()
+ { return *m_bitmaps; }
+
+ const EstimatedScores &GetEstimatedScores() const
+ { return *m_estimatedScores; }
+
+ const InputPaths &GetInputPaths() const
+ { return m_inputPaths; }
+
+ const TargetPhraseImpl &GetInitPhrase() const
+ { return *m_initPhrase; }
+
+ void Decode();
+ std::string OutputBest() const;
+ std::string OutputNBest();
+ std::string OutputTransOpt();
+
+protected:
+
+ InputPaths m_inputPaths;
+ Bitmaps *m_bitmaps;
+ EstimatedScores *m_estimatedScores;
+ TargetPhraseImpl *m_initPhrase;
+
+ Search *m_search;
+
+ // must be run in same thread as Decode()
+ void Init();
+ void CalcFutureScore();
+
+};
+
+}
+