📄 sntncepars.h
字号:
#ifndef sntncparser_h
#define sntncparser_h
#include "sntncelex.h"
//#define MAXCNODE 200
#define MAXENODE 1000000
#define MAXTNODE 100000
#define MAXSQUE 500000
#define MAXAMB 5
typedef struct subpf_t{
struct pf_t **sublst; //list of the subcat frame's nodes
unsigned int rulno; //rule of the subcat frame
// unsigned __int64 subamb; //total nbr of all derivational ambiguities within the subcat frame
}subpf_t; //subcat frame of pf
typedef union strint_t{
char *literal;
unsigned int totalamb;
} strint_t;
typedef struct pf_t{
strint_t litoramb;
//char *literal; //literal name of the category
//unsigned int totalamb; //total nbr of direct ambiguities under the node
// unsigned __int64 Tamb; //total nbr of all derivational ambiguities under the node
struct subpf_t *subpfs; //array of ambiguous subcat frames
// unsigned int vp; //index to the most probable subcat frame, part of the viterbi parse
double prb; //the value of maximum probability
// struct pf_t *nxt; //link to other nodes
unsigned int cate; //category of the node
// unsigned int refs;
}pf_t; //node of packed forest
typedef struct edge_t{
unsigned int rule;
unsigned int role; //rule.role indicates the progressing state of the edge
struct edge_t *prevedge; //the edge from which this one succeeded
pf_t *ppf; //pointer to the associated pf node
unsigned int origin; //starting point of the edge
}edge_t; //edge of chart
typedef struct edge_lst_t{
edge_t **head; //index table of edges
int numb; //total nbr of entries whithin the table
int size; //size of the table
}edge_lst_t; //list of edges
typedef struct chartnode_t{
// edge_lst_t byedges; //list of progressing edges that end at one node
// edge_lst_t stedges; //list of edges that have just started from one node
int plst;
int pled;
int numb;
int chd;
int ctl;
char *expeclist;
}chartnode_t; //node of chart
typedef struct rrset_struct{
rulrol_struct *prr;
int next;
}rrset_struct; //set of rrs
extern rrset_struct *rrset;
extern pf_t **catetbl; //
extern edge_t *edgepool;
extern pf_t *trnodepool;
//extern edge_t *compedgepool;
//extern char *mark;
extern char *mymark;
extern chartnode_t chart[MAXCNODE]; //the chart
extern int interactive;
extern int npfs;
extern unsigned int *lstack;
extern int lsptr;
extern int addchartnode();
extern int parses();
extern int releasewholepf();
extern int releasechart();
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -