Jekub / Wapiti

A simple and fast discriminative sequence labeling toolkit ( http://wapiti.limsi.fr )
Other
251 stars 86 forks source link

model.c #3

Closed va5ja closed 11 years ago

va5ja commented 11 years ago

There's a problem with mdl_load() function. The code should rewind the file first like:

if (fscanf(file, "#mdl#%d#%"SCNu64"\n", &type, &nact) == 2) {
  mdl->type = type;
} else {
  rewind(file);
  if (fscanf(file, "#mdl#%"SCNu64"\n", &nact) == 1) {
    mdl->type = 0;
  } else {
    fatal(err);
  }
}
Jekub commented 11 years ago

Thank you for reporting these two problems.