diff options
author | Ulrich Germann <ugermann@inf.ed.ac.uk> | 2015-05-11 02:34:24 +0300 |
---|---|---|
committer | Ulrich Germann <ugermann@inf.ed.ac.uk> | 2015-05-11 02:34:24 +0300 |
commit | 7da7ce52dab34fda4f2fcae2b37a7696eb773b2c (patch) | |
tree | 05e607e4d26e2dbb819a2214eb16406cace77500 /moses/InputType.h | |
parent | db5ccff364508f9348b2d20d6ac57bc9da38bedf (diff) |
Added context buffering in IOWrapper for context-sensitive decoding.
Unfortunately, this seems to slow things down quite a bit.
Diffstat (limited to 'moses/InputType.h')
-rw-r--r-- | moses/InputType.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/moses/InputType.h b/moses/InputType.h index 24c7ef4fb..398af0cbf 100644 --- a/moses/InputType.h +++ b/moses/InputType.h @@ -58,7 +58,7 @@ protected: ReorderingConstraint m_reorderingConstraint; /**< limits on reordering specified either by "-mp" switch or xml tags */ std::string m_textType; std::string m_passthrough; - + boost::shared_ptr<std::string> m_context; public: // used in -continue-partial-translation @@ -173,6 +173,13 @@ public: //! number of words in this sentence/confusion network virtual size_t GetSize() const =0; + virtual boost::shared_ptr<std::string> const& + GetContext() const { return m_context; } + + virtual void + SetContext(boost::shared_ptr<std::string> const& ctx) + { m_context = ctx; } + //! populate this InputType with data from in stream virtual int Read(std::istream& in,const std::vector<FactorType>& factorOrder) =0; |