Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Alexis Nasr
macaon2
Commits
87fdf274
Commit
87fdf274
authored
Feb 05, 2018
by
Alexis Nasr
Browse files
added three different features to words : SPEAKER DIRECORY FILE
parent
326f414c
Changes
4
Hide whitespace changes
Inline
Side-by-side
maca_common/include/mcd.h
View file @
87fdf274
...
...
@@ -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
...
...
maca_common/src/mcd.c
View file @
87fdf274
...
...
@@ -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
;
...
...
maca_common/src/word.c
View file @
87fdf274
...
...
@@ -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
;
...
...
maca_trans_parser/src/oracle_parser_arc_eager.c
View file @
87fdf274
...
...
@@ -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
)));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment