ZGen
0.2.0
a linearization system for natural language.
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
shiftreduce
pipe
pipe.h
Go to the documentation of this file.
1
#ifndef __ZGEN_SHIFTREDUCE_PIPE_PIPE_H__
2
#define __ZGEN_SHIFTREDUCE_PIPE_PIPE_H__
3
4
#include "settings.h"
5
#include "
types/instance.h
"
6
#include "
knowledge/postag_constrain.h
"
7
#include "
shiftreduce/option.h
"
8
#include "
shiftreduce/types/action.h
"
9
#include "
shiftreduce/types/state.h
"
10
#include "
shiftreduce/types/internal_types.h
"
11
#include "
shiftreduce/model/model.h
"
12
#include "
shiftreduce/decode/decode_context.h
"
13
#include "
shiftreduce/decode/decoder.h
"
14
#include "
shiftreduce/learning/learner.h
"
15
16
namespace
ZGen {
17
18
namespace
ShiftReduce {
19
20
// The basic pipe class
21
class
Pipe
{
22
public
:
23
24
Pipe
(
const
option_t
& opts);
25
26
27
virtual
~Pipe
();
28
35
bool
save_model
();
36
43
bool
load_model
();
44
51
bool
realize
();
52
private
:
53
59
void
build_output(
const
StateItem
& item,
60
const
dependency_t
& input,
61
dependency_t
* output);
62
63
private
:
64
const
option_t
& opts;
/*< The options */
66
int
timestamp;
68
DecodeContext
* ctx;
70
Decoder
* decoder;
72
Learner
* learner;
74
Model
* model;
76
Knowledge::PostagConstrain
* constrain;
77
private
:
78
std::vector<dependency_t> dataset;
79
std::vector<dependency_t> referset;
80
};
81
82
}
83
84
}
85
#endif // end for __ZGEN_SHIFTREDUCE_PIPE_PIPE_H__
ZGen::ShiftReduce::Pipe::save_model
bool save_model()
ZGen::ShiftReduce::Pipe::realize
bool realize()
Definition:
pipe.cc:91
ZGen::ShiftReduce::StateItem
Definition:
state.h:15
ZGen::ShiftReduce::Option
Definition:
option.h:10
ZGen::ShiftReduce::Model
Definition:
model.h:12
ZGen::ShiftReduce::Learner
Definition:
learner.h:12
decode_context.h
ZGen::DependencyParse
Definition:
instance.h:18
ZGen::Knowledge::PostagConstrain
Definition:
postag_constrain.h:14
ZGen::ShiftReduce::Decoder
Definition:
decoder.h:15
ZGen::ShiftReduce::DecodeContext
Used to maintain the memory cache used by the decoder.
Definition:
decode_context.h:9
ZGen::ShiftReduce::Pipe::load_model
bool load_model()
action.h
internal_types.h
instance.h
ZGen::ShiftReduce::Pipe::Pipe
Pipe(const option_t &opts)
Definition:
pipe.cc:17
ZGen::ShiftReduce::Pipe::~Pipe
virtual ~Pipe()
Definition:
pipe.cc:50
decoder.h
ZGen::ShiftReduce::Pipe
Definition:
pipe.h:21
state.h
postag_constrain.h
model.h
learner.h
option.h
Generated by
1.8.6