exact_nbest_semact.c File Reference

#include "sxversion.h"
#include "sxunix.h"
#include "earley.h"
#include "XH.h"
#include "nbest.h"
#include "sxstack.h"
#include "sxspf.h"
#include "SS.h"
#include <ctype.h>
#include <math.h>
#include <float.h>
#include "udag_scanner.h"
Include dependency graph for exact_nbest_semact.c:

Go to the source code of this file.

Data Structures

struct  RECTANGLE
struct  couple_SXINT

Defines

#define SX_GLOBAL_VAR_EXACT_NBEST
#define GET_HOOK(Aij)   (spf.outputG.lhs [spf.outputG.maxprod+(Aij)].prolon)
#define OPTION(opt)   (1 << (opt - 1))
#define noOPTION(opt)   (~OPTION (opt))
#define OPT_NB   ((sizeof(option_tbl)/sizeof(*option_tbl))-1)
#define UNKNOWN_ARG   (SXINT)0
#define EXACT_NBEST   (SXINT)1
#define pb   SXTRUE
#define an   SXTRUE
#define print_forest   SXTRUE
#define INVALIDE   -1

Functions

struct dedication * get_dedication_ptr (SXINT item_or_Aij, SXINT k)
SXINT get_dedication_top (SXINT item_or_Aij)
static SXINT option_get_kind (char *arg)
static charoption_get_text (SXINT kind)
static charexact_nbest_ME (void)
static charexact_nbest_args_usage (void)
static SXBOOLEAN exact_nbest_args_decode (int *pargnum, int argc, char *argv[])
static void AijXrhs_oflw (SXINT old_size, SXINT new_size)
static void XH_rhs_oflw (SXINT old_size, SXINT new_size)
static void XH_rhs_set_oflw (SXINT old_size, SXINT new_size)
static void AijXid_oflw (SXINT old_size, SXINT new_size)
static SXINT exact_nbest_sem_pass (void)
static void exact_nbest_sem_init (void)
static void exact_nbest_sem_final (void)
static void exact_nbest_sem_close (void)
static SXBOOLEAN Aij_or_item_kth_best (SXINT Aij_or_item, SXINT k)
void exact_nbest_semact (void)
SXINT ** alloue_mat (SXINT x, SXINT y)
static void Aij_m_n_hd_oflw (SXINT old_size, SXINT new_size)
static void Pij_m_n_hd_oflw (SXINT old_size, SXINT new_size)
void exact_nbest_allocate (SXINT exact_nbest_allocate_exact_nbest)
void libere_mat (SXINT **mat, SXINT x)
void exact_nbest_free (void)
static void nbest_forest_print_Aij_id (SXINT Aij_id)
static void nbest_forest_print_id_set (SXINT id)
static void nbest_forest_print_prod (SXINT prod, SXINT i)
static void nbest_forest_print_forest (char *string)
static void replace_prod (SXINT Aij_id, SXINT new_Aij_id)
static void bottom_upG_optimization (SXINT nbest)
static SXINT td_Pij_first_pb_pass (SXINT Pij)
static SXINT td_Aij_pre_first_pb_pass (SXINT Aij)
static SXINT generate_nbest_Pij (SXINT Pij, SXINT lhs_id, SXBA nbest_set)
static SXINT generate_nbest_forest (SXINT Pij)
SXINT traite_Pij (SXINT Pij)
int affiche_Aij (int Aij)
int affiche_Pij (int Pij)
RECTANGLEdecompose_matrice_x (SXINT k_min, SXINT k_max, SXINT **mat, SXINT XMAX, SXINT YMAX)
RECTANGLEdecompose_matrice_y (SXINT k_min, SXINT k_max, SXINT **mat, SXINT XMAX, SXINT YMAX)
void affiche_rectangles (RECTANGLE *l)
SXINT nombre_rectangles (RECTANGLE *l)
void free_rectangles (RECTANGLE *l)
SXINT remplis_matrices_Pij (SXINT Aij)
void Pij_get_m_n_best (SXINT Pij, SXINT m, SXINT n)
void Aij_get_m_n_best (SXINT Aij, SXINT m, SXINT n)
void affiche_foret_reduite (void)
void affiche_measures (void)

Variables

static char ME [] = "exact_nbest_semact"
char WHAT_EXACT_NBEST_SEMACT [] = "@(#)SYNTAX - $Id: exact_nbest_semact.c 1594 2008-09-22 14:39:31Z syntax $" WHAT_DEBUG
static SXINT exact_nbest = 1
static char Usage []
static charoption_tbl []
static SXINT option_kind []
static SXBA Pij_set
static SXBA * Pij2rankset
static SXBA * Aij2rankset
static XxY_header AijXid
static XxY_header nbest_forest_hd
static XH_header XH_rhs
static XH_header XH_nbest_set_hd
static XxY_header AijXrhs
static SXBA multiple_AijXrhs_set
static SXBA rhs_set
static SXINT * Aij_id2prod
static SXINT * Aij_id_stack
static XH_header XH_rhs_set
static SXINT * XH_rhs_set2Aij_id
static SXINT kth
static SXINT kth_id
static SXINT start_symbol_id
static SXINT * Pij_i_max
static SXINT * Pij_j_max
static SXINT * Pij_or
static SXINT * Pij_rel
static SXINT *** Pij_mat
static XxYxZ_header Aij_m_n_hd
static couple_SXINT ** Aij_m_n
static XxYxZ_header Pij_m_n_hd
static RECTANGLE ** Pij_m_n

Define Documentation

#define an   SXTRUE
#define EXACT_NBEST   (SXINT)1

Definition at line 76 of file exact_nbest_semact.c.

Referenced by exact_nbest_args_decode().

#define GET_HOOK ( Aij   )     (spf.outputG.lhs [spf.outputG.maxprod+(Aij)].prolon)
#define INVALIDE   -1
#define noOPTION ( opt   )     (~OPTION (opt))

Definition at line 71 of file exact_nbest_semact.c.

Referenced by main().

#define OPT_NB   ((sizeof(option_tbl)/sizeof(*option_tbl))-1)

Definition at line 73 of file exact_nbest_semact.c.

Referenced by option_get_kind(), and option_get_text().

#define OPTION ( opt   )     (1 << (opt - 1))

Definition at line 70 of file exact_nbest_semact.c.

Referenced by main(), and options_text().

#define pb   SXTRUE
#define print_forest   SXTRUE

Definition at line 172 of file exact_nbest_semact.c.

Referenced by exact_nbest_sem_pass().

#define SX_GLOBAL_VAR_EXACT_NBEST

Definition at line 30 of file exact_nbest_semact.c.

#define UNKNOWN_ARG   (SXINT)0

Function Documentation

int affiche_Aij ( int  Aij  ) 

Definition at line 1397 of file exact_nbest_semact.c.

Referenced by affiche_Pij(), Aij_get_m_n_best(), and remplis_matrices_Pij().

void affiche_foret_reduite ( void   ) 
void affiche_measures ( void   ) 

Definition at line 1937 of file exact_nbest_semact.c.

References Aij_m_n_hd, GET_HOOK, n, Pij_m_n_hd, RECTANGLE::suiv, T, and XxYxZ_set().

Referenced by exact_nbest_sem_pass().

int affiche_Pij ( int  Pij  ) 

Definition at line 1408 of file exact_nbest_semact.c.

References affiche_Aij().

Referenced by Pij_get_m_n_best().

void affiche_rectangles ( RECTANGLE l  ) 
void Aij_get_m_n_best ( SXINT  Aij,
SXINT  m,
SXINT  n 
)
static void Aij_m_n_hd_oflw ( SXINT  old_size,
SXINT  new_size 
) [static]

Definition at line 293 of file exact_nbest_semact.c.

Referenced by exact_nbest_allocate().

static SXBOOLEAN Aij_or_item_kth_best ( SXINT  Aij_or_item,
SXINT  k 
) [static]
static void AijXid_oflw ( SXINT  old_size,
SXINT  new_size 
) [static]

Definition at line 253 of file exact_nbest_semact.c.

References Aij_id2prod.

Referenced by exact_nbest_allocate().

static void AijXrhs_oflw ( SXINT  old_size,
SXINT  new_size 
) [static]

Definition at line 232 of file exact_nbest_semact.c.

References multiple_AijXrhs_set, and sxba_resize().

Referenced by exact_nbest_allocate().

SXINT** alloue_mat ( SXINT  x,
SXINT  y 
)

Definition at line 278 of file exact_nbest_semact.c.

Referenced by remplis_matrices_Pij().

static void bottom_upG_optimization ( SXINT  nbest  )  [static]
RECTANGLE * decompose_matrice_x ( SXINT  k_min,
SXINT  k_max,
SXINT **  mat,
SXINT  XMAX,
SXINT  YMAX 
)
RECTANGLE * decompose_matrice_y ( SXINT  k_min,
SXINT  k_max,
SXINT **  mat,
SXINT  XMAX,
SXINT  YMAX 
)
void exact_nbest_allocate ( SXINT  exact_nbest_allocate_exact_nbest  ) 
static SXBOOLEAN exact_nbest_args_decode ( int *  pargnum,
int  argc,
char argv[] 
) [static]
static char* exact_nbest_args_usage ( void   )  [static]

Definition at line 130 of file exact_nbest_semact.c.

References Usage.

Referenced by exact_nbest_semact().

void exact_nbest_free ( void   ) 
static char* exact_nbest_ME ( void   )  [static]

Definition at line 123 of file exact_nbest_semact.c.

References ME.

Referenced by exact_nbest_semact().

static void exact_nbest_sem_close ( void   )  [static]

Definition at line 421 of file exact_nbest_semact.c.

Referenced by exact_nbest_semact().

static void exact_nbest_sem_final ( void   )  [static]

Definition at line 415 of file exact_nbest_semact.c.

References exact_nbest_free().

Referenced by exact_nbest_semact().

void exact_nbest_sem_init ( void   )  [static]

Definition at line 354 of file exact_nbest_semact.c.

References exact_nbest, and exact_nbest_allocate().

Referenced by exact_nbest_semact().

static SXINT exact_nbest_sem_pass ( void   )  [static]
void exact_nbest_semact ( void   ) 
void free_rectangles ( RECTANGLE l  ) 

Definition at line 1653 of file exact_nbest_semact.c.

References RECTANGLE::suiv.

Referenced by Pij_get_m_n_best().

static SXINT generate_nbest_forest ( SXINT  Pij  )  [static]

Definition at line 1356 of file exact_nbest_semact.c.

References AijXid, generate_nbest_Pij(), Pij2rankset, and Pij_set.

static SXINT generate_nbest_Pij ( SXINT  Pij,
SXINT  lhs_id,
SXBA  nbest_set 
) [static]
struct dedication* get_dedication_ptr ( SXINT  item_or_Aij,
SXINT  k 
) [read]
SXINT get_dedication_top ( SXINT  item_or_Aij  ) 

Definition at line 1013 of file nbest_semact.c.

References Aij_or_item2last_dedication.

Referenced by td_Aij_pre_first_pb_pass().

void libere_mat ( SXINT **  mat,
SXINT  x 
)

Definition at line 360 of file exact_nbest_semact.c.

Referenced by exact_nbest_free().

static void nbest_forest_print_Aij_id ( SXINT  Aij_id  )  [static]

Definition at line 428 of file exact_nbest_semact.c.

References AijXid, and spf_print_Xpq().

Referenced by nbest_forest_print_prod().

static void nbest_forest_print_forest ( char string  )  [static]
static void nbest_forest_print_id_set ( SXINT  id  )  [static]

Definition at line 441 of file exact_nbest_semact.c.

References top, and XH_nbest_set_hd.

Referenced by nbest_forest_print_forest().

static void nbest_forest_print_prod ( SXINT  prod,
SXINT  i 
) [static]
SXINT nombre_rectangles ( RECTANGLE l  ) 

Definition at line 1644 of file exact_nbest_semact.c.

References n, and RECTANGLE::suiv.

Referenced by Pij_get_m_n_best().

static SXINT option_get_kind ( char arg  )  [static]

Definition at line 88 of file exact_nbest_semact.c.

References OPT_NB, option_kind, option_tbl, and UNKNOWN_ARG.

Referenced by exact_nbest_args_decode().

static char* option_get_text ( SXINT  kind  )  [static]

Definition at line 108 of file exact_nbest_semact.c.

References OPT_NB, option_kind, and option_tbl.

Referenced by exact_nbest_args_decode().

void Pij_get_m_n_best ( SXINT  Pij,
SXINT  m,
SXINT  n 
)
static void Pij_m_n_hd_oflw ( SXINT  old_size,
SXINT  new_size 
) [static]

Definition at line 300 of file exact_nbest_semact.c.

Referenced by exact_nbest_allocate().

SXINT remplis_matrices_Pij ( SXINT  Aij  ) 
static void replace_prod ( SXINT  Aij_id,
SXINT  new_Aij_id 
) [static]
static SXINT td_Aij_pre_first_pb_pass ( SXINT  Aij  )  [static]
static SXINT td_Pij_first_pb_pass ( SXINT  Pij  )  [static]

Definition at line 808 of file exact_nbest_semact.c.

Referenced by exact_nbest_sem_pass().

SXINT traite_Pij ( SXINT  Pij  ) 

Definition at line 1385 of file exact_nbest_semact.c.

Referenced by exact_nbest_sem_pass().

static void XH_rhs_oflw ( SXINT  old_size,
SXINT  new_size 
) [static]

Definition at line 238 of file exact_nbest_semact.c.

References rhs_set, and sxba_resize().

Referenced by exact_nbest_allocate().

static void XH_rhs_set_oflw ( SXINT  old_size,
SXINT  new_size 
) [static]

Definition at line 246 of file exact_nbest_semact.c.

References XH_rhs_set2Aij_id.

Referenced by exact_nbest_allocate().


Variable Documentation

SXBA * Aij2rankset [static]
SXINT* Aij_id2prod [static]
SXINT* Aij_id_stack [static]
couple_SXINT** Aij_m_n [static]

Definition at line 222 of file exact_nbest_semact.c.

XxYxZ_header Aij_m_n_hd [static]
XxY_header AijXid [static]
XxY_header AijXrhs [static]
SXINT exact_nbest = 1 [static]
SXINT kth [static]

Definition at line 191 of file exact_nbest_semact.c.

Referenced by exact_nbest_sem_pass().

SXINT kth_id [static]

Definition at line 191 of file exact_nbest_semact.c.

Referenced by exact_nbest_sem_pass().

char ME[] = "exact_nbest_semact" [static]
SXBA multiple_AijXrhs_set [static]
XxY_header nbest_forest_hd [static]
SXINT option_kind[] [static]
Initial value:
 {
    UNKNOWN_ARG,
    EXACT_NBEST, EXACT_NBEST, EXACT_NBEST,
}

Definition at line 83 of file exact_nbest_semact.c.

Referenced by option_get_kind(), and option_get_text().

char* option_tbl[] [static]
Initial value:
 {
    "",
    "N", "en", "exact_nbest",
}

Definition at line 78 of file exact_nbest_semact.c.

Referenced by option_get_kind(), and option_get_text().

SXBA* Pij2rankset [static]
SXINT* Pij_i_max [static]
SXINT* Pij_j_max [static]
RECTANGLE** Pij_m_n [static]

Definition at line 224 of file exact_nbest_semact.c.

XxYxZ_header Pij_m_n_hd [static]
SXINT*** Pij_mat [static]
SXINT* Pij_or [static]
SXINT* Pij_rel [static]
SXBA Pij_set [static]
SXBA rhs_set [static]

Definition at line 180 of file exact_nbest_semact.c.

Referenced by bottom_upG_optimization(), and XH_rhs_oflw().

SXINT start_symbol_id [static]

Definition at line 191 of file exact_nbest_semact.c.

Referenced by exact_nbest_sem_pass(), and td_Aij_pre_first_pb_pass().

char Usage[] [static]
Initial value:
 "\
\t\t-N #exact_nbest, -en #exact_nbest, -exact_nbest #exact_nbest (default -exact_nbest 1)\n\
"

Definition at line 66 of file exact_nbest_semact.c.

Referenced by exact_nbest_args_usage().

char WHAT_EXACT_NBEST_SEMACT[] = "@(#)SYNTAX - $Id: exact_nbest_semact.c 1594 2008-09-22 14:39:31Z syntax $" WHAT_DEBUG

Definition at line 47 of file exact_nbest_semact.c.

XH_header XH_nbest_set_hd [static]
XH_header XH_rhs [static]
XH_header XH_rhs_set [static]
SXINT* XH_rhs_set2Aij_id [static]

Generated on Wed Apr 21 16:39:35 2010 for syntax-6.0b7 by  doxygen 1.6.1