ZGen  0.2.0
a linearization system for natural language.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
partial_decoder.h
Go to the documentation of this file.
1 #ifndef __ZGEN_SHIFTREDUCE_PARTIAL_DECODER_H__
2 #define __ZGEN_SHIFTREDUCE_PARTIAL_DECODER_H__
3 
4 #include "decoder.h"
5 #include "types/tree.h"
6 
7 namespace ZGen {
8 namespace ShiftReduce {
9 
10 class PartialDecoder: public Decoder {
11 public:
14  Model* model,
15  const Knowledge::PostagConstrain* constrain);
16 
17 private:
23  void config_input(const dependency_t* input);
24 
31  void get_possible_actions(const StateItem& item);
32 
38  bool legal_shift(const StateItem& item, int i);
39 
45  bool legal_left_arc(const StateItem& item);
46 
53  bool legal_right_arc(const StateItem& item);
54 
56  DependencyForest forest;
57 };
58 
59 } // end for namespace Shiftreduce
60 } // end for namespace ZGen
61 
62 #endif // end for __ZGEN_SHIFTREDUCE_PARTIAL_DECODER_H__
const option_t & opts
The options.
Definition: decoder.h:65
Definition: state.h:15
Definition: option.h:10
Definition: model.h:12
DecodeContext * ctx
The decode context.
Definition: decoder.h:69
Definition: tree.h:117
Definition: instance.h:18
Definition: postag_constrain.h:14
Definition: decoder.h:15
Used to maintain the memory cache used by the decoder.
Definition: decode_context.h:9
Model * model
The model.
Definition: decoder.h:67
Definition: partial_decoder.h:10
PartialDecoder(const option_t &opts, DecodeContext *ctx, Model *model, const Knowledge::PostagConstrain *constrain)
Definition: partial_decoder.cc:9