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/Batch/Search.h')
-rw-r--r--contrib/moses2/PhraseBased/Batch/Search.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/contrib/moses2/PhraseBased/Batch/Search.h b/contrib/moses2/PhraseBased/Batch/Search.h
new file mode 100644
index 000000000..4f4b35d2e
--- /dev/null
+++ b/contrib/moses2/PhraseBased/Batch/Search.h
@@ -0,0 +1,53 @@
+/*
+ * SearchNormal.h
+ *
+ * Created on: 25 Oct 2015
+ * Author: hieu
+ */
+#pragma once
+
+#include <vector>
+#include "../../legacy/Range.h"
+#include "../../legacy/Bitmap.h"
+#include "../../TypeDef.h"
+#include "../Search.h"
+#include "Stacks.h"
+
+namespace Moses2
+{
+class Hypothesis;
+class InputPath;
+class TargetPhrases;
+class TargetPhraseImpl;
+
+namespace NSBatch
+{
+class Stacks;
+
+class Search: public Moses2::Search
+{
+public:
+ Search(Manager &mgr);
+ virtual ~Search();
+
+ virtual void Decode();
+ const Hypothesis *GetBestHypo() const;
+
+ void AddInitialTrellisPaths(TrellisPaths<TrellisPath> &paths) const;
+
+protected:
+ Stacks m_stacks;
+
+ Batch &m_batch;
+
+ void Decode(size_t stackInd);
+ void Extend(const Hypothesis &hypo, const InputPath &path);
+ void Extend(const Hypothesis &hypo, const TargetPhrases &tps,
+ const InputPath &path, const Bitmap &newBitmap, SCORE estimatedScore);
+ void Extend(const Hypothesis &hypo, const TargetPhraseImpl &tp,
+ const InputPath &path, const Bitmap &newBitmap, SCORE estimatedScore);
+
+};
+
+}
+}