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:
authorLane Schwartz <dowobeha@gmail.com>2013-02-22 21:24:35 +0400
committerLane Schwartz <dowobeha@gmail.com>2013-02-23 01:28:48 +0400
commit04f107fbb02442638928c190dd3fa2f13225d570 (patch)
tree577dec3cc61465632d5a7ee081ae000209dda239 /moses/Manager.h
parente7563111de02c5e39ff297e58641b612ff02fb4b (diff)
Add flag to output search graph in Kenneth's hypergraph format.
Diffstat (limited to 'moses/Manager.h')
-rw-r--r--moses/Manager.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/moses/Manager.h b/moses/Manager.h
index c5f54847b..d580674b4 100644
--- a/moses/Manager.h
+++ b/moses/Manager.h
@@ -94,10 +94,20 @@ class Manager
void operator=(Manager const&);
const TranslationSystem* m_system;
private:
+
+ // Helper functions to output search graph in HTK standard lattice format
void OutputFeatureWeightsForSLF(std::ostream &outputSearchGraphStream) const;
size_t OutputFeatureWeightsForSLF(size_t index, const FeatureFunction* ff, std::ostream &outputSearchGraphStream) const;
void OutputFeatureValuesForSLF(const Hypothesis* hypo, bool zeros, std::ostream &outputSearchGraphStream) const;
size_t OutputFeatureValuesForSLF(size_t index, bool zeros, const Hypothesis* hypo, const FeatureFunction* ff, std::ostream &outputSearchGraphStream) const;
+
+ // Helper functions to output search graph in the hypergraph format of Kenneth Heafield's lazy hypergraph decoder
+ void OutputFeatureWeightsForHypergraph(std::ostream &outputSearchGraphStream) const;
+ size_t OutputFeatureWeightsForHypergraph(size_t index, const FeatureFunction* ff, std::ostream &outputSearchGraphStream) const;
+ void OutputFeatureValuesForHypergraph(const Hypothesis* hypo, std::ostream &outputSearchGraphStream) const;
+ size_t OutputFeatureValuesForHypergraph(size_t index, const Hypothesis* hypo, const FeatureFunction* ff, std::ostream &outputSearchGraphStream) const;
+
+
protected:
// data
// InputType const& m_source; /**< source sentence to be translated */
@@ -143,6 +153,7 @@ public:
void OutputSearchGraph(long translationId, std::ostream &outputSearchGraphStream) const;
void OutputSearchGraphAsSLF(long translationId, std::ostream &outputSearchGraphStream) const;
+ void OutputSearchGraphAsHypergraph(long translationId, std::ostream &outputSearchGraphStream) const;
void GetSearchGraph(std::vector<SearchGraphNode>& searchGraph) const;
const InputType& GetSource() const {
return m_source;