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

Merge branch 'master' of gitlab.lif.univ-mrs.fr:alexis.nasr/macaon2

parents 2bfa72cb a664877a
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#define __WORD_EMB__ #define __WORD_EMB__
#include"hash.h" #include"hash.h"
/* #include"fann.h"*/
#include"dico.h" #include"dico.h"
typedef struct typedef struct
...@@ -19,7 +18,6 @@ void word_emb_free(word_emb *we); ...@@ -19,7 +18,6 @@ void word_emb_free(word_emb *we);
word_emb *word_emb_load(char *filename); word_emb *word_emb_load(char *filename);
float *word_emb_get_vector(word_emb *we, char *word); float *word_emb_get_vector(word_emb *we, char *word);
int word_emb_get_code(word_emb *we, char *word); int word_emb_get_code(word_emb *we, char *word);
/* int word_emb_fill_input_array_dnn(fann_type *input_array, word_emb *we, int code, int first_index); */
int word_emb_fill_input_array_dnn(float *input_array, word_emb *we, int code, int first_index); int word_emb_fill_input_array_dnn(float *input_array, word_emb *we, int code, int first_index);
void word_emb_print(FILE *f, word_emb *we, int code); void word_emb_print(FILE *f, word_emb *we, int code);
......
...@@ -158,7 +158,9 @@ void cff2fann(context *ctx) ...@@ -158,7 +158,9 @@ void cff2fann(context *ctx)
/* printf("representation = %d\n", m->representation[mcd_col]); */ /* printf("representation = %d\n", m->representation[mcd_col]); */
if(m->representation[mcd_col] == MCD_REPRESENTATION_EMB){ if(m->representation[mcd_col] == MCD_REPRESENTATION_EMB){
/* printf("it is an embedding val = %d, file = %s\n", val, m->filename[mcd_col]); */ fprintf(stderr, "it is an embedding val = %d, file = %s\n", feature_valindex, m->filename[mcd_col]);
//int word_emb_get_code(word_emb *we, char *word)
/* word_emb_print(stdout, m->word_emb_array[mcd_col], feature_valindex); */ /* word_emb_print(stdout, m->word_emb_array[mcd_col], feature_valindex); */
/* printf("\n"); */ /* printf("\n"); */
printf("\t%d", feature_valindex); printf("\t%d", feature_valindex);
......
...@@ -27,6 +27,7 @@ cff_cutoff_context *cff_cutoff_context_new(void) ...@@ -27,6 +27,7 @@ cff_cutoff_context *cff_cutoff_context_new(void)
{ {
cff_cutoff_context *ctx = (cff_cutoff_context *)memalloc(sizeof(cff_cutoff_context)); cff_cutoff_context *ctx = (cff_cutoff_context *)memalloc(sizeof(cff_cutoff_context));
ctx->help = 0;
ctx->verbose = 0; ctx->verbose = 0;
ctx->program_name = NULL; ctx->program_name = NULL;
ctx->vocabs_filename = NULL; ctx->vocabs_filename = NULL;
......
...@@ -19,6 +19,7 @@ perceptron_context *perceptron_context_new(void) ...@@ -19,6 +19,7 @@ perceptron_context *perceptron_context_new(void)
{ {
perceptron_context *ctx = (perceptron_context *)memalloc(sizeof(perceptron_context)); perceptron_context *ctx = (perceptron_context *)memalloc(sizeof(perceptron_context));
ctx->help = 0;
ctx->verbose = 0; ctx->verbose = 0;
ctx->program_name = NULL; ctx->program_name = NULL;
ctx->perc_model_filename = NULL; ctx->perc_model_filename = NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment