diff options
author | Barry Haddow <barry.haddow@gmail.com> | 2014-08-06 19:37:09 +0400 |
---|---|---|
committer | Barry Haddow <barry.haddow@gmail.com> | 2014-08-06 19:37:09 +0400 |
commit | fbe73dd06f89e0b17d9f3ec9e82d5c8f2add7fbd (patch) | |
tree | f1a24ac4919f669099bd4742f06d5892b5c167bd /moses/ChartManager.h | |
parent | ae2a52bd21e3b4aebb611357f23ae3a8e56bdaeb (diff) |
Stub out chart hypergraph output
Diffstat (limited to 'moses/ChartManager.h')
-rw-r--r-- | moses/ChartManager.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/moses/ChartManager.h b/moses/ChartManager.h index a660f94d9..5ff7620fd 100644 --- a/moses/ChartManager.h +++ b/moses/ChartManager.h @@ -49,13 +49,14 @@ private: std::auto_ptr<SentenceStats> m_sentenceStats; clock_t m_start; /**< starting time, used for logging */ unsigned m_hypothesisId; /* For handing out hypothesis ids to ChartHypothesis */ + size_t m_lineNumber; ChartParser m_parser; ChartTranslationOptionList m_translationOptionList; /**< pre-computed list of translation options for the phrases in this sentence */ public: - ChartManager(InputType const& source); + ChartManager(size_t lineNumber, InputType const& source); ~ChartManager(); void ProcessSentence(); void AddXmlChartOptions(); @@ -64,6 +65,8 @@ public: void GetSearchGraph(long translationId, std::ostream &outputSearchGraphStream) const; void FindReachableHypotheses( const ChartHypothesis *hypo, std::map<unsigned,bool> &reachable ) const; /* auxilliary function for GetSearchGraph */ + /** Output in (modified) Kenneth hypergraph format */ + void OutputSearchGraphAsHypergraph(std::ostream &outputSearchGraphStream) const; //! the input sentence being decoded const InputType& GetSource() const { @@ -97,6 +100,10 @@ public: } const ChartParser &GetParser() const { return m_parser; } + + size_t GetLineNumber() const { + return m_lineNumber; + } }; } |