diff --git a/maca_common/include/mcd.h b/maca_common/include/mcd.h index a86626fe4fa43f269579b86bb3ba769f525bf2ec..aa4ade656c36921b030a52c3cd8314c1b7daa4d9 100644 --- a/maca_common/include/mcd.h +++ b/maca_common/include/mcd.h @@ -8,7 +8,7 @@ #define MCD_INVALID_VALUE -1 -#define MCD_WF_NB 48 +#define MCD_WF_NB 51 #define MCD_WF_ID 0 #define MCD_WF_OFFSET 0 /* ID and OFFSET are synonymous */ @@ -61,6 +61,12 @@ #define MCD_WF_Person 45 #define MCD_WF_Tense 46 +#define MCD_WF_FILE 47 +#define MCD_WF_DIRECTORY 48 +#define MCD_WF_SPEAKER 49 + + + /*Abbr AdpType AdvType diff --git a/maca_common/src/mcd.c b/maca_common/src/mcd.c index 4a2348e14f4f3c406c1af3636ff3b5f3a35822d5..34fd53b7bfbae62d856189c29183af4f735cd3c3 100644 --- a/maca_common/src/mcd.c +++ b/maca_common/src/mcd.c @@ -512,6 +512,12 @@ int mcd_wf_code(char *wf) /* if(!strcmp(wf, "INT")) return MCD_WF_INT; */ if(!strcmp(wf, "GOV")) return MCD_WF_GOV; if(!strcmp(wf, "SENT_SEG")) return MCD_WF_SENT_SEG; + + if(!strcmp(wf, "FILE")) return MCD_WF_FILE; + if(!strcmp(wf, "DIRECTORY")) return MCD_WF_DIRECTORY; + if(!strcmp(wf, "SPEAKER")) return MCD_WF_SPEAKER; + + if(!strcmp(wf, "A")) return MCD_WF_A; if(!strcmp(wf, "B")) return MCD_WF_B; if(!strcmp(wf, "C")) return MCD_WF_C; diff --git a/maca_common/src/word.c b/maca_common/src/word.c index 21e303e844bc5e7fb9030a56995420bf55504a3f..33f27da9cc0865cfa55130e4dd1b5e2964b496a3 100644 --- a/maca_common/src/word.c +++ b/maca_common/src/word.c @@ -22,7 +22,6 @@ word *word_new(char *input) w->wf_array[MCD_WF_GOV] = WORD_INVALID_GOV; w->form = NULL; w->form_char16 = NULL; - w->index = -1; w->signature = -1; w->is_root = 0; diff --git a/maca_trans_parser/src/oracle_parser_arc_eager.c b/maca_trans_parser/src/oracle_parser_arc_eager.c index 7a34fcdca157840a9f270cca723c3c17ddc067db..3440c709f5ba412a921f535d3ed9b8e09a989089 100644 --- a/maca_trans_parser/src/oracle_parser_arc_eager.c +++ b/maca_trans_parser/src/oracle_parser_arc_eager.c @@ -61,17 +61,18 @@ int oracle_parser_arc_eager(config *c, word_buffer *ref, int root_label) printf("dans ref gov de b0 (%d) = %d\n", b0_index, b0_gov_index);*/ /* s0 is the root of the sentence */ - /* if((s0_label == root_label) + if((s0_label == root_label) && check_all_dependents_of_word_in_ref_are_in_hyp(c, ref, s0_index) ){ return MVT_PARSER_ROOT; - }*/ + } /* word on the top of the stack is an end of sentence marker */ if((word_get_sent_seg(word_buffer_get_word_n(ref, s0_index)) == 1) && (word_get_sent_seg(word_buffer_get_word_n(config_get_buffer(c), s0_index)) != 1)){ return MVT_PARSER_EOS; } + /* LEFT ARC b0 is the governor and s0 the dependent */ if(s0_gov_index == b0_index){ return movement_parser_left_code(word_get_label(word_buffer_get_word_n(ref, s0_index)));