context.h 2.82 KB
Newer Older
Alexis Nasr's avatar
Alexis Nasr committed
1
2
3
4
5
6
#ifndef __CONTEXT__
#define __CONTEXT__

#define TEST_MODE 1
#define TRAIN_MODE 2

7

Alexis Nasr's avatar
Alexis Nasr committed
8
9
10
11
#define DEFAULT_MULTI_COL_DESC_FILENAME "maca_trans_parser.mcd" 
#define DEFAULT_FEATURES_MODEL_FILENAME "maca_trans_parser.fm" 
#define DEFAULT_VOCABS_FILENAME "maca_trans_parser.vocab" 
#define DEFAULT_MODEL_FILENAME  "maca_trans_parser.model" 
Alexis Nasr's avatar
Alexis Nasr committed
12

13
14
15
16
#define DEFAULT_MULTI_COL_DESC_TAGGER_FILENAME "maca_trans_tagger.mcd" 
#define DEFAULT_FEATURES_MODEL_TAGGER_FILENAME "maca_trans_tagger.fm" 
#define DEFAULT_VOCABS_TAGGER_FILENAME "maca_trans_tagger.vocab" 
#define DEFAULT_MODEL_TAGGER_FILENAME  "maca_trans_tagger.model" 
Alexis Nasr's avatar
Alexis Nasr committed
17
#define DEFAULT_F2P_FILENAME "fP" 
18

Alexis Nasr's avatar
Alexis Nasr committed
19
20
21
22
#include "dico_vec.h"
#include "feat_model.h"
#include "mcd.h"
#include "stdlib.h"
23
#include "form2pos.h"
Alexis Nasr's avatar
Alexis Nasr committed
24
25
26
27

typedef struct {
  int help;
  char *program_name;
Alexis Nasr's avatar
Alexis Nasr committed
28
  char *input_filename;
Alexis Nasr's avatar
Alexis Nasr committed
29
30
31
32
33
  char *perc_model_filename;
  char *dnn_model_filename;
  char *cff_filename;
  char *fann_filename;
  char *stag_desc_filename;
34
  char *f2p_filename;
Alexis Nasr's avatar
Alexis Nasr committed
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
  int hidden_neurons_nb;
  int iteration_nb;
  int debug_mode;
  int verbose;
  int feature_cutoff;
  int mode;
  int sent_nb;
  float hash_ratio;
  int beam_width;
  int mvt_nb;
  dico_vec *vocabs;
  char *vocabs_filename;
  int perceptron;
  char *mcd_filename;
  mcd *mcd_struct;
  char *features_model_filename;
  feat_model *features_model;
  int stream_mode;
  dico *d_perceptron_features;
  dico *dico_labels;
  char *maca_data_path;
  char *language;
57
  char *root_label;
58
  form2pos *f2p;
Alexis Nasr's avatar
Alexis Nasr committed
59
60
  int conll;
  int ifpls;
Alexis Nasr's avatar
Alexis Nasr committed
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
} context;

context *context_new(void);
void context_free(context *ctx);
context *context_read_options(int argc, char *argv[]);
void context_general_help_message(context *ctx);
void context_model_help_message(context *ctx);
void context_iterations_help_message(context *ctx);
void context_cff_help_message(context *ctx);
void context_fann_help_message(context *ctx);
void context_d_features_help_message(context *ctx);
void context_d_classes_help_message(context *ctx);
void context_conll_help_message(context *ctx);
void context_cutoff_help_message(context *ctx);
void context_mode_help_message(context *ctx);
void context_beam_help_message(context *ctx);
void context_sent_nb_help_message(context *ctx);
void context_dnn_model_help_message(context *ctx);
void context_hidden_neurons_nb_help_message(context *ctx);
void context_stag_desc_filename_help_message(context *ctx);
Alexis Nasr's avatar
Alexis Nasr committed
81
void context_input_filename_help_message(context *ctx);
Alexis Nasr's avatar
Alexis Nasr committed
82
83
84
85
86
87
88
void context_mcd_help_message(context *ctx);
void context_features_model_help_message(context *ctx);
void context_vocabs_help_message(context *ctx);

void context_language_help_message(context *ctx);
void context_maca_data_path_help_message(context *ctx);

89
90
void context_f2p_filename_help_message(context *ctx);

Alexis Nasr's avatar
Alexis Nasr committed
91
92
93
void context_conll_help_message(context *ctx);
void context_ifpls_help_message(context *ctx);
void context_input_help_message(context *ctx);
Alexis Nasr's avatar
Alexis Nasr committed
94
95

#endif