ZGen  0.2.0
a linearization system for natural language.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Static Public Member Functions | List of all members
ZGen::ShiftReduce::ActionUtils Class Reference

#include <action_utils.h>

Static Public Member Functions

static bool is_shift (const action_t &act)
 
static bool is_left_arc (const action_t &act)
 
static bool is_right_arc (const action_t &act)
 
static int get_correct_actions (const dependency_t &reference, action_sequence_t &actions)
 

Member Function Documentation

int ZGen::ShiftReduce::ActionUtils::get_correct_actions ( const dependency_t reference,
action_sequence_t actions 
)
static

Get gold action sequence.

Parameters
[in]referenceThe reference dependency instance.
[out]actionsThe oracle transition sequence.
Returns
int The number of actions in transition
bool ZGen::ShiftReduce::ActionUtils::is_left_arc ( const action_t act)
static

Judge if the given action is LEFT-ARC

Parameters
[in]actThe action
Returns
bool If the action is LEFT-ARC, return true; otherwise false.
bool ZGen::ShiftReduce::ActionUtils::is_right_arc ( const action_t act)
static

Judge if the given action is LEFT-ARC

Parameters
[in]actThe action
Returns
bool If the action is LEFT-ARC, return true; otherwise false.
bool ZGen::ShiftReduce::ActionUtils::is_shift ( const action_t act)
static

Judge if the given action is SHIFT

Parameters
[in]actThe action
Returns
bool If the action is SHIFT, return true; otherwise false.

The documentation for this class was generated from the following files: