Skip to content
Snippets Groups Projects
Commit 87fdf274 authored by Alexis Nasr's avatar Alexis Nasr
Browse files

added three different features to words : SPEAKER DIRECORY FILE

parent 326f414c
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#define MCD_INVALID_VALUE -1 #define MCD_INVALID_VALUE -1
#define MCD_WF_NB 48 #define MCD_WF_NB 51
#define MCD_WF_ID 0 #define MCD_WF_ID 0
#define MCD_WF_OFFSET 0 /* ID and OFFSET are synonymous */ #define MCD_WF_OFFSET 0 /* ID and OFFSET are synonymous */
...@@ -61,6 +61,12 @@ ...@@ -61,6 +61,12 @@
#define MCD_WF_Person 45 #define MCD_WF_Person 45
#define MCD_WF_Tense 46 #define MCD_WF_Tense 46
#define MCD_WF_FILE 47
#define MCD_WF_DIRECTORY 48
#define MCD_WF_SPEAKER 49
/*Abbr /*Abbr
AdpType AdpType
AdvType AdvType
......
...@@ -512,6 +512,12 @@ int mcd_wf_code(char *wf) ...@@ -512,6 +512,12 @@ int mcd_wf_code(char *wf)
/* if(!strcmp(wf, "INT")) return MCD_WF_INT; */ /* if(!strcmp(wf, "INT")) return MCD_WF_INT; */
if(!strcmp(wf, "GOV")) return MCD_WF_GOV; if(!strcmp(wf, "GOV")) return MCD_WF_GOV;
if(!strcmp(wf, "SENT_SEG")) return MCD_WF_SENT_SEG; 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, "A")) return MCD_WF_A;
if(!strcmp(wf, "B")) return MCD_WF_B; if(!strcmp(wf, "B")) return MCD_WF_B;
if(!strcmp(wf, "C")) return MCD_WF_C; if(!strcmp(wf, "C")) return MCD_WF_C;
......
...@@ -22,7 +22,6 @@ word *word_new(char *input) ...@@ -22,7 +22,6 @@ word *word_new(char *input)
w->wf_array[MCD_WF_GOV] = WORD_INVALID_GOV; w->wf_array[MCD_WF_GOV] = WORD_INVALID_GOV;
w->form = NULL; w->form = NULL;
w->form_char16 = NULL; w->form_char16 = NULL;
w->index = -1; w->index = -1;
w->signature = -1; w->signature = -1;
w->is_root = 0; w->is_root = 0;
......
...@@ -61,17 +61,18 @@ int oracle_parser_arc_eager(config *c, word_buffer *ref, int root_label) ...@@ -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);*/ printf("dans ref gov de b0 (%d) = %d\n", b0_index, b0_gov_index);*/
/* s0 is the root of the sentence */ /* 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) && check_all_dependents_of_word_in_ref_are_in_hyp(c, ref, s0_index)
){ ){
return MVT_PARSER_ROOT; return MVT_PARSER_ROOT;
}*/ }
/* word on the top of the stack is an end of sentence marker */ /* 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) 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)){ && (word_get_sent_seg(word_buffer_get_word_n(config_get_buffer(c), s0_index)) != 1)){
return MVT_PARSER_EOS; return MVT_PARSER_EOS;
} }
/* LEFT ARC b0 is the governor and s0 the dependent */ /* LEFT ARC b0 is the governor and s0 the dependent */
if(s0_gov_index == b0_index){ if(s0_gov_index == b0_index){
return movement_parser_left_code(word_get_label(word_buffer_get_word_n(ref, s0_index))); return movement_parser_left_code(word_get_label(word_buffer_get_word_n(ref, s0_index)));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment