Commit 6dd4cd50 authored by Alexis Nasr's avatar Alexis Nasr
Browse files

fixed a bug in parser oracle concerning action IGNORE

parent d8892b07
......@@ -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");
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment