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 'moses-chart/src/ChartManager.h')
-rw-r--r--moses-chart/src/ChartManager.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/moses-chart/src/ChartManager.h b/moses-chart/src/ChartManager.h
new file mode 100644
index 000000000..a8af3c4ae
--- /dev/null
+++ b/moses-chart/src/ChartManager.h
@@ -0,0 +1,41 @@
+
+#pragma once
+
+#include <vector>
+#include "ChartCell.h"
+#include "ChartTranslationOptionCollection.h"
+#include "ChartCellCollection.h"
+#include "../../moses/src/InputType.h"
+#include "../../moses/src/WordsRange.h"
+#include "../../moses/src/TrellisPathList.h"
+
+namespace MosesChart
+{
+
+class Hypothesis;
+class TrellisPathList;
+
+class Manager
+{
+protected:
+ Moses::InputType const& m_source; /**< source sentence to be translated */
+ ChartCellCollection m_hypoStackColl;
+ TranslationOptionCollection m_transOptColl; /**< pre-computed list of translation options for the phrases in this sentence */
+
+public:
+ Manager(Moses::InputType const& source);
+ ~Manager();
+ void ProcessSentence();
+ const Hypothesis *GetBestHypothesis() const;
+ void CalcNBest(size_t count, MosesChart::TrellisPathList &ret,bool onlyDistinct=0) const;
+
+ /***
+ * to be called after processing a sentence (which may consist of more than just calling ProcessSentence() )
+ */
+ void CalcDecoderStatistics() const;
+ void EnumerateTrellis(size_t count, TrellisPathList &ret) const;
+
+};
+
+}
+