ZGen  0.2.0
a linearization system for natural language.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Macros | Typedefs | Variables
score_context.h File Reference
#include "shiftreduce/types/state.h"
#include "utils/math_utils.h"

Go to the source code of this file.

Classes

struct  ZGen::ShiftReduce::ScoreContext
 

Namespaces

 ZGen
 
 ZGen::ShiftReduce
 

Macros

#define _LEGEAL_RANGE_(x)   (((x) >= 0) && ((x) < N))
 
#define __SET_CTX(prefix)
 
#define __CLEAR_CTX(prefix)
 
#define __SET_CNT(prefix)
 
#define __CLEAR_CNT(prefix)
 

Typedefs

typedef ScoreContext ZGen::ShiftReduce::ctx_t
 

Variables

const int ZGen::ShiftReduce::kNoneWord = eg::WordAlphabet::NONE
 
const int ZGen::ShiftReduce::kNonePostag = eg::PennTreebankPostagAlphabet::NONE
 
const int ZGen::ShiftReduce::kNoneDeprel = eg::PennTreebankDeprelAlphabet::NONE
 

Macro Definition Documentation

#define __CLEAR_CNT (   prefix)
Value:
do { \
prefix##la = 0; \
prefix##ra = 0; \
prefix##ls = 0; \
prefix##rs = 0; \
} while (0);
#define __CLEAR_CTX (   prefix)
Value:
do { \
prefix##w = kNoneWord; \
prefix##p = kNonePostag; \
prefix##l = kNoneDeprel; \
} while (0);
const int kNonePostag
Definition: score_context.h:44
const int kNoneWord
Definition: score_context.h:43
const int kNoneDeprel
Definition: score_context.h:45
#define __SET_CNT (   prefix)
Value:
do { \
prefix##la = item.nr_left_children[prefix]; \
prefix##ra = item.nr_right_children[prefix]; \
prefix##ls = utils::bin(item.nr_left_descendant[prefix]); \
prefix##rs = utils::bin(item.nr_right_descendant[prefix]); \
} while (0);
int bin(int x)
Definition: math_utils.cc:6
#define __SET_CTX (   prefix)
Value:
do { \
prefix##w = (item.ref->forms).at(prefix); \
prefix##p = item.postags[prefix]; \
prefix##l = item.deprels[prefix]; \
} while (0);
#define _LEGEAL_RANGE_ (   x)    (((x) >= 0) && ((x) < N))