Commit 326f414c authored by Alexis Nasr's avatar Alexis Nasr
Browse files

added the new feature s0seg

parent 592d9ddf
......@@ -14,6 +14,7 @@
int s0g(void *c) {return (word_get_gov(stack_s0(config_get_stack((config *) c))) == WORD_INVALID_GOV) ? 0 : 1;}
int s0sf(void *c) {return word_get_label(stack_s0(config_get_stack((config *) c)));}
int s0seg(void *c) {return word_get_sent_seg(stack_s0(config_get_stack((config *) c)));}
int s0f(void *c) {return word_get_form(stack_s0(config_get_stack((config *) c)));}
int s0l(void *c) {return word_get_lemma(stack_s0(config_get_stack((config *) c)));}
int s0c(void *c) {return word_get_cpos(stack_s0(config_get_stack((config *) c)));}
......@@ -178,7 +179,7 @@ int b0sf(void *c) {return word_get_label(word_buffer_b0(config_get_buffer((confi
int b0len(void *c) {
int len = 0;
word *w = word_buffer_b0(config_get_buffer((config *) c));
if(w->form)
if(w && w->form)
len = strlen(w->form);
return (len > 7)? 7 : len;
}
......@@ -856,6 +857,7 @@ feat_lib *feat_lib_build(void)
feat_lib_add(fl, FEAT_TYPE_LABEL, (char *)"s0sf", s0sf);
feat_lib_add(fl, FEAT_TYPE_INT, (char *)"s0g", s0g);
feat_lib_add(fl, FEAT_TYPE_INT, (char *)"s0seg", s0seg);
feat_lib_add(fl, FEAT_TYPE_FORM, (char *)"s0f", s0f);
feat_lib_add(fl, FEAT_TYPE_LEMMA, (char *)"s0l", s0l);
feat_lib_add(fl, FEAT_TYPE_CPOS, (char *)"s0c", s0c);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment