diff --git a/maca_trans_parser/src/context.c b/maca_trans_parser/src/context.c index f375287d31ec4bdd9737fa0573ecdb93633aa024..1e05f78c3891412d427257c5aec6e1de0f3c51db 100644 --- a/maca_trans_parser/src/context.c +++ b/maca_trans_parser/src/context.c @@ -303,7 +303,10 @@ context *context_read_options(int argc, char *argv[]) break; case 'P': ctx->f2p_filename = strdup(optarg); - ctx->f2p = form2pos_read(ctx->f2p_filename); + if(!strcmp(ctx->f2p_filename, "_") || !strcmp(ctx->f2p_filename, "NULL")) + ctx->f2p = NULL; + else + ctx->f2p = form2pos_read(ctx->f2p_filename); break; case 'N': ctx->dnn_model_filename = strdup(optarg); diff --git a/maca_trans_parser/src/simple_decoder_tagger.c b/maca_trans_parser/src/simple_decoder_tagger.c index f54b3c9046d47633299418095ebe18b33a847298..7e3811d9985c65aed3300dc1ab6b713fff58fc75 100644 --- a/maca_trans_parser/src/simple_decoder_tagger.c +++ b/maca_trans_parser/src/simple_decoder_tagger.c @@ -18,7 +18,7 @@ void add_signature_to_words_in_word_buffer(word_buffer *bf, form2pos *f2p) { int i; word *w; - char lower_form[100]; + char lower_form[1000]; for(i = word_buffer_get_nbelem(bf) - 1; i >=0 ; i--){ w = word_buffer_get_word_n(bf, i); @@ -46,7 +46,7 @@ void add_signature_to_words_in_word_buffer(word_buffer *bf, form2pos *f2p, dico signature = form2pos_get_signature(f2p, w->form); w->signature = signature; if(form2pos_word_is_non_ambiguous(f2p, w->form, &pos)){ - /* printf("%s non ambigu code = %d \n", pos, dico_string2int(dico_pos, pos)); */ + // printf("%s non ambigu code = %d \n", pos, dico_string2int(dico_pos, pos)); word_set_pos(w, dico_string2int(dico_pos, pos)); }