diff --git a/maca_common/include/mcd.h b/maca_common/include/mcd.h index c45d5d79bb642104b75664d8e368bba0d753f28c..622d4c3e3f8b7a1446f1cf01c00aa5cc9f74a5c7 100644 --- a/maca_common/include/mcd.h +++ b/maca_common/include/mcd.h @@ -119,6 +119,7 @@ typedef struct { mcd *mcd_build_conll07(void); mcd *mcd_build_ifpls(void); mcd *mcd_build_wplgf(void); +mcd *mcd_build_wplgfs(void); mcd *mcd_read(char *mcd_filename, int verbose); void mcd_link_to_dico(mcd *m, dico_vec *vocabs, int verbose); diff --git a/maca_common/src/mcd.c b/maca_common/src/mcd.c index a9313d6babf7eccd421d1fe6d6bd5cb9d688c024..79533c51ef86338b697bbd06faf46cd15c70a868 100644 --- a/maca_common/src/mcd.c +++ b/maca_common/src/mcd.c @@ -371,6 +371,58 @@ mcd *mcd_build_ifpls(void) return m; } +mcd *mcd_build_wplgfs(void) +{ + mcd *m = mcd_new(6); + int col; + + col = 0; + m->wf[col]=MCD_WF_FORM; + m->wf_str[col]=strdup("FORM"); + m->representation[col]= MCD_REPRESENTATION_VOCAB; + m->filename[col] = strdup("_"); + m->wf2col[MCD_WF_FORM] = col; + + col = 1; + m->wf[col]=MCD_WF_POS; + m->wf_str[col]=strdup("POS"); + m->representation[col]= MCD_REPRESENTATION_VOCAB; + m->filename[col] = strdup("_"); + m->wf2col[MCD_WF_POS] = 1; + + col = 2; + m->wf[col]=MCD_WF_LEMMA; + m->wf_str[col]=strdup("LEMMA"); + m->representation[col]= MCD_REPRESENTATION_VOCAB; + m->filename[col] = strdup("_"); + m->wf2col[MCD_WF_LEMMA] = 2; + + col = 3; + m->wf[col]=MCD_WF_GOV; + m->wf_str[col]=strdup("GOV"); + m->representation[col]= MCD_REPRESENTATION_INT; + m->filename[col] = strdup("_"); + m->wf2col[MCD_WF_GOV] = 3; + + col = 4; + m->wf[col]=MCD_WF_LABEL; + m->wf_str[col]=strdup("LABEL"); + m->representation[col]= MCD_REPRESENTATION_VOCAB; + m->filename[col] = strdup("_"); + m->wf2col[MCD_WF_LABEL] = 4; + + col = 5; + m->wf[col]=MCD_WF_SENT_SEG; + m->wf_str[col]=strdup("SENT_SEG"); + m->representation[col]= MCD_REPRESENTATION_INT; + m->filename[col] = strdup("_"); + m->wf2col[MCD_WF_SENT_SEG] = 5; + + return m; +} + + + /* returns a dico_vec containing the different dictionnaries found in an mcd structure */ dico_vec *mcd_build_dico_vec(mcd *mcd_struct) diff --git a/maca_tools/src/mcf2conll.c b/maca_tools/src/mcf2conll.c index 4b300ba6aa922f180a1212ae26fb28287eb1f8b8..7fb78ae84e5670574af824eaf6a4541f73052003 100644 --- a/maca_tools/src/mcf2conll.c +++ b/maca_tools/src/mcf2conll.c @@ -44,55 +44,6 @@ void context_general_help_message(context *ctx) fprintf(stderr, "\t-o --conll : conll filename (write to stdout if absent)\n"); } -mcd *mcd_build_wplgfs(void) -{ - mcd *m = mcd_new(6); - int col; - - col = 0; - m->wf[col]=MCD_WF_FORM; - m->wf_str[col]=strdup("FORM"); - m->representation[col]= MCD_REPRESENTATION_VOCAB; - m->filename[col] = strdup("_"); - m->wf2col[MCD_WF_FORM] = col; - - col = 1; - m->wf[col]=MCD_WF_POS; - m->wf_str[col]=strdup("POS"); - m->representation[col]= MCD_REPRESENTATION_VOCAB; - m->filename[col] = strdup("_"); - m->wf2col[MCD_WF_POS] = 1; - - col = 2; - m->wf[col]=MCD_WF_LEMMA; - m->wf_str[col]=strdup("LEMMA"); - m->representation[col]= MCD_REPRESENTATION_VOCAB; - m->filename[col] = strdup("_"); - m->wf2col[MCD_WF_LEMMA] = 2; - - col = 3; - m->wf[col]=MCD_WF_GOV; - m->wf_str[col]=strdup("GOV"); - m->representation[col]= MCD_REPRESENTATION_INT; - m->filename[col] = strdup("_"); - m->wf2col[MCD_WF_GOV] = 3; - - col = 4; - m->wf[col]=MCD_WF_LABEL; - m->wf_str[col]=strdup("LABEL"); - m->representation[col]= MCD_REPRESENTATION_VOCAB; - m->filename[col] = strdup("_"); - m->wf2col[MCD_WF_LABEL] = 4; - - col = 5; - m->wf[col]=MCD_WF_SENT_SEG; - m->wf_str[col]=strdup("SENT_SEG"); - m->representation[col]= MCD_REPRESENTATION_INT; - m->filename[col] = strdup("_"); - m->wf2col[MCD_WF_SENT_SEG] = 5; - - return m; -} void mcf2conll_check_options(context *ctx){ if(ctx->help){ diff --git a/maca_trans_parser/src/oracle_parser_arc_eager.c b/maca_trans_parser/src/oracle_parser_arc_eager.c index e77d9e4cb96eab8f079f458cff12641f620c92fa..c8651868c4e99346303a1440f3e08958d472e4c3 100644 --- a/maca_trans_parser/src/oracle_parser_arc_eager.c +++ b/maca_trans_parser/src/oracle_parser_arc_eager.c @@ -9,7 +9,7 @@ int check_all_dependents_of_word_in_ref_are_in_hyp(config *c, word_buffer *ref, int dep; int gov_ref; int gov_hyp; - int sentence_change; + /* int sentence_change; */ #if 1 for(dep = word_index - 1; (dep > 0) && (word_get_sent_seg(word_buffer_get_word_n(ref, dep)) == 0); dep--){