KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Trainer.h
Go to the documentation of this file.
1 #ifndef TRAINER_H_
2 #define TRAINER_H_
3 
13 #include <iostream>
14 
15 #include "spear/Lexicon.h"
16 #include "spear/Model.h"
17 #include "spear/Wide.h"
18 
19 namespace spear {
20 
21  class Trainer : public RCObject
22  {
23  public:
24  Trainer(const spear::ModelPtr & model);
25 
26  void setVerbose(int v) { verbose_ = v; };
27 
28  bool learn(
29  IStream&,
30  const std::string& modelDir
31  );
32 
33  static const int VERBOSE_LOW = 0;
34  static const int VERBOSE_MEDIUM = 1;
35  static const int VERBOSE_HIGH = 2;
36 
37  private:
38 
39  spear::LexiconPtr lexicon_;
40 
41  spear::ModelPtr model_;
42 
43  int verbose_;
44  };
45 
47 
48 } // end namespace spear
49 
50 #endif
static const int VERBOSE_LOW
Definition: Trainer.h:33
static const int VERBOSE_MEDIUM
Definition: Trainer.h:34
RCIPtr< spear::Trainer > TrainerPtr
Definition: Trainer.h:46
Trainer(const spear::ModelPtr &model)
Definition: Trainer.cc:18
void setVerbose(int v)
Definition: Trainer.h:26
Definition: RCIPtr.h:24
Definition: Trainer.h:21
#define IStream
Definition: Wide.h:39
bool learn(IStream &, const std::string &modelDir)
Definition: Trainer.cc:63
static const int VERBOSE_HIGH
Definition: Trainer.h:35