Skip to content
Snippets Groups Projects
Select Git revision
  • 568cf30a95f4e02efeefe9dd272aceebf355245d
  • master default protected
  • johannes
  • partial_parser
  • Aloui_Dary
  • ignore_punct
  • AC
  • classifier
  • fixhelp
  • libmacaon2
  • error_predictor
  • morpho
  • ssrnn
  • tfparsing
  • silvio
  • tagger_options
  • maca_trans_frame_parser
  • alexis
  • new_config
  • tagparse
  • maca_graph_parser
21 results

maca_trans_parser_nn.cc

Blame
  • maca_trans_parser_nn.cc 8.77 KiB
    #include<stdio.h>
    #include<stdlib.h>
    #include<string.h>
    #include<unistd.h>
    #include<getopt.h>
    #include"context.h"
    #include"movement_parser.h"
    #include"oracle_parser_arc_eager.h"
    #include"feat_fct.h"
    #include"feature_table.h"
    #include"dico.h"
    #include "keras.h"
    #include"movement_parser_arc_eager.h"
    #include"feat_fct.h"
    #include"feature_table.h"
    
    
    
    
    void maca_trans_parser_nn_help_message(context *ctx)
    {
      context_general_help_message(ctx);
      context_debug_help_message(ctx);
      fprintf(stderr, "INPUT\n");
      context_input_help_message(ctx);
      context_mcd_help_message(ctx);
      context_vocabs_help_message(ctx);
      context_features_model_help_message(ctx);
      context_root_label_help_message(ctx);
      context_json_help_message(ctx);
      context_dnn_model_help_message(ctx);
    }
    
    void maca_trans_parser_nn_check_options(context *ctx){
      if(ctx->help
         /*!ctx->conll_filename*/
         /*     || !ctx->perc_model_filename
         || !ctx->mcd_filename
         || !ctx->vocabs_filename
         || !ctx->features_model_filename*/
         ){
        maca_trans_parser_nn_help_message(ctx);
        exit(1);
      }
    }
    
    void set_linguistic_resources_filenames_parser(context *ctx)
    {
      char absolute_filename[500];
    
      if(!ctx->dnn_model_filename){
        strcpy(absolute_filename, ctx->maca_data_path);
        strcat(absolute_filename, DEFAULT_MODEL_PARSER_NN_FILENAME);
        ctx->dnn_model_filename = strdup(absolute_filename);
      }
    
      if(!ctx->json_filename){
        strcpy(absolute_filename, ctx->maca_data_path);
        strcat(absolute_filename, DEFAULT_JSON_PARSER_NN_FILENAME);
        ctx->json_filename = strdup(absolute_filename);
      }
    
      if(!ctx->vocabs_filename){
        strcpy(absolute_filename, ctx->maca_data_path);
        strcat(absolute_filename, DEFAULT_VOCABS_PARSER_NN_FILENAME);
        ctx->vocabs_filename = strdup(absolute_filename);
      }
    
      if(!ctx->features_model_filename){
        strcpy(absolute_filename, ctx->maca_data_path);