#include <decoder.h>
ZGen::ShiftReduce::Decoder::~Decoder |
( |
| ) |
|
virtual void ZGen::ShiftReduce::Decoder::config_input |
( |
const dependency_t * |
input | ) |
|
|
protectedpure virtual |
Config the input onto the decoder.
- Parameters
-
[in] | input | The pointer to the input instance. |
Perform the beam-search decoding.
- Parameters
-
[in] | input | The input dependency instance. |
[in] | gold_actions | The gold transition action (only actived in the learning process). |
- Returns
- decode_result_t The decode result.
virtual void ZGen::ShiftReduce::Decoder::get_possible_actions |
( |
const StateItem & |
item | ) |
|
|
protectedpure virtual |
Get the possible actions from the current state. Store the possible actions in the possible_actions (action_collection_t)
- Parameters
-
void ZGen::ShiftReduce::Decoder::get_possible_shift_actions |
( |
const StateItem & |
item, |
|
|
int |
index, |
|
|
word_t |
word, |
|
|
postag_t |
postag |
|
) |
| |
|
protected |
Get the possible shift action from the current state, by refering the postag constrain. The possible actions is stored in possible_actions
- Parameters
-
[in] | item | The input state item. |
[in] | index | The index. |
[in] | word | The word. |
[in] | postag | The postag. |
The candidate state tuple: (from state, action, score)
Model* ZGen::ShiftReduce::Decoder::model |
|
protected |
const option_t& ZGen::ShiftReduce::Decoder::opts |
|
protected |
The cached packed score for transition.
The cached possible actions.
The documentation for this class was generated from the following files: