diff options
author | Paul Baltescu <pauldb89@gmail.com> | 2013-11-25 23:24:42 +0000 |
---|---|---|
committer | Paul Baltescu <pauldb89@gmail.com> | 2013-11-25 23:24:42 +0000 |
commit | 0febed366e6c3fedd288bc1bddfcd65f247cab81 (patch) | |
tree | 5dbe0c5763994aa9d12c5092a9c1b39d87e16540 /decoder/decoder.h | |
parent | bd6fef61505b19989cc327620632e8e7efda2e6e (diff) | |
parent | b6c44f82ffca74cc38cf6039ac9ab3c2c66fd5d6 (diff) |
Merge branch 'master' of https://github.com/redpony/cdec
Diffstat (limited to 'decoder/decoder.h')
-rw-r--r-- | decoder/decoder.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/decoder/decoder.h b/decoder/decoder.h index 79c7a602..8039a42b 100644 --- a/decoder/decoder.h +++ b/decoder/decoder.h @@ -25,9 +25,10 @@ private: class SentenceMetadata; class Hypergraph; -struct DecoderImpl; +class DecoderImpl; -struct DecoderObserver { +class DecoderObserver { + public: virtual ~DecoderObserver(); virtual void NotifyDecodingStart(const SentenceMetadata& smeta); virtual void NotifySourceParseFailure(const SentenceMetadata& smeta); @@ -37,9 +38,10 @@ struct DecoderObserver { virtual void NotifyDecodingComplete(const SentenceMetadata& smeta); }; -struct Grammar; // TODO once the decoder interface is cleaned up, - // this should be somewhere else -struct Decoder { +class Grammar; // TODO once the decoder interface is cleaned up, + // this should be somewhere else +class Decoder { + public: Decoder(int argc, char** argv); Decoder(std::istream* config_file); bool Decode(const std::string& input, DecoderObserver* observer = NULL); @@ -49,6 +51,7 @@ struct Decoder { std::vector<weight_t>& CurrentWeightVector(); const std::vector<weight_t>& CurrentWeightVector() const; + // this sets the current sentence ID void SetId(int id); ~Decoder(); const boost::program_options::variables_map& GetConf() const { return conf; } |