summaryrefslogtreecommitdiff
path: root/decoder/decoder.h
diff options
context:
space:
mode:
authorChris Dyer <cdyer@Chriss-MacBook-Air.local>2013-11-25 00:14:16 -0500
committerChris Dyer <cdyer@Chriss-MacBook-Air.local>2013-11-25 00:14:16 -0500
commit26235c2770f10fc6975a06fd3a8167cbd23029a9 (patch)
tree3b3acd17a1772939a55231b4fc43a5d4279c330a /decoder/decoder.h
parent9e80389b9763aa4f7f626ec71b561ccf6948d3ad (diff)
remove dead code, add adagrad crf learner
Diffstat (limited to 'decoder/decoder.h')
-rw-r--r--decoder/decoder.h13
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; }