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:
authorHieu Hoang <hieuhoang@gmail.com>2012-11-12 23:56:18 +0400
committerHieu Hoang <hieuhoang@gmail.com>2012-11-12 23:56:18 +0400
commit5e3ef23cef6101d2c098eb3445f562e8f595655b (patch)
treeb8c332b6fa82bae84ea4910967a10ba1b08a7107 /moses/Search.h
parent8c785cff2b1be3cccd76ea9026f71b649762dfc3 (diff)
move moses/src/* to moses/
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