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/Search.h')
-rw-r--r--moses/Search.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/moses/Search.h b/moses/Search.h
new file mode 100644
index 000000000..d961d17cd
--- /dev/null
+++ b/moses/Search.h
@@ -0,0 +1,43 @@
+#ifndef moses_Search_h
+#define moses_Search_h
+
+#include <vector>
+#include "TypeDef.h"
+#include "Phrase.h"
+
+namespace Moses
+{
+
+class HypothesisStack;
+class Hypothesis;
+class InputType;
+class TranslationOptionCollection;
+class Manager;
+
+/** Abstract class used in the phrase-based decoder.
+ * Cube pruning and normal searches are the classes that inherits from this class
+ */
+class Search
+{
+public:
+ virtual const std::vector < HypothesisStack* >& GetHypothesisStacks() const = 0;
+ virtual const Hypothesis *GetBestHypothesis() const = 0;
+ virtual void ProcessSentence() = 0;
+ Search(Manager& manager) : m_manager(manager) {}
+ virtual ~Search()
+ {}
+
+ // Factory
+ static Search *CreateSearch(Manager& manager, const InputType &source, SearchAlgorithm searchAlgorithm,
+ const TranslationOptionCollection &transOptColl);
+
+protected:
+
+ const Phrase *m_constraint;
+ Manager& m_manager;
+
+};
+
+
+}
+#endif