diff --git a/maca_trans_parser/src/maca_trans_parser_arc_eager_mcf2cff.c b/maca_trans_parser/src/maca_trans_parser_arc_eager_mcf2cff.c index 069452cf4390f1075e314677595032951b6af164..285f757145d387492e9dce259c0f633963b9d435 100644 --- a/maca_trans_parser/src/maca_trans_parser_arc_eager_mcf2cff.c +++ b/maca_trans_parser/src/maca_trans_parser_arc_eager_mcf2cff.c @@ -55,9 +55,12 @@ void generate_training_file(FILE *output_file, context *ctx) feat_vec *fv = feat_vec_new(feature_types_nb); int sentence_nb = 0; int root_label = dico_string2int(ctx->dico_labels, (char *) ctx->root_label); - int punct_label = dico_string2int(ctx->dico_labels, (char *) ctx->punct_label); + int punct_label = dico_string2int(ctx->dico_postags, (char *) ctx->punct_label); word_buffer *ref = word_buffer_load_mcf(ctx->input_filename, ctx->mcd_struct); FILE *mcf_file = myfopen(ctx->input_filename, "r"); + + fprintf(stderr, "punct label = %s code = %d\n", ctx->punct_label, punct_label); + /* create an mcd that corresponds to ctx->mcd_struct, but without gov and label */ /* the idea is to ignore syntax in the mcf file that will be read */ @@ -148,6 +151,7 @@ int main(int argc, char *argv[]) } ctx->dico_labels = dico_vec_get_dico(ctx->vocabs, (char *)"LABEL"); + ctx->dico_postags = dico_vec_get_dico(ctx->vocabs, (char *)"POS"); if(ctx->dico_labels == NULL){ fprintf(stderr, "cannot find label names\n"); diff --git a/maca_trans_parser/src/oracle_parser_arc_eager.c b/maca_trans_parser/src/oracle_parser_arc_eager.c index bb39f9d7eb289a6f2bc49a2bf427e77fd721921d..db6ab156fe93eeb825aa0642e793e0ac486c4560 100644 --- a/maca_trans_parser/src/oracle_parser_arc_eager.c +++ b/maca_trans_parser/src/oracle_parser_arc_eager.c @@ -50,7 +50,10 @@ int oracle_parser_arc_eager(config *c, word_buffer *ref, int root_label, int pun /* int s0_label_in_hyp; */ /* if(!stack_is_empty(config_get_stack(c)) && !word_buffer_is_empty(config_get_buffer(c))){ */ - + + + + // fprintf(stderr, "punct label = %d\n", punct_label); b0 = word_buffer_b0(config_get_buffer(c)); b0_index = word_get_index(b0);