From 2349ba2abe9b10d4fd5a31f0a3066418dfb13896 Mon Sep 17 00:00:00 2001
From: Alexis Nasr <alexis.nasr@lif.univ-mrs.fr>
Date: Thu, 14 Jul 2016 16:47:17 -0400
Subject: [PATCH] fixed bugs in maca_lemmatizer

---
 maca_lemmatizer/src/context.c         | 10 +++++-----
 maca_lemmatizer/src/maca_lemmatizer.c |  2 ++
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/maca_lemmatizer/src/context.c b/maca_lemmatizer/src/context.c
index 307b538..61b957e 100644
--- a/maca_lemmatizer/src/context.c
+++ b/maca_lemmatizer/src/context.c
@@ -88,16 +88,16 @@ context *context_read_options(int argc, char *argv[])
       {"debug",               no_argument,       0, 'd'},
       {"conll",               required_argument, 0, 'i'},
       {"mcd",                 required_argument, 0, 'm'}, 
-      {"language",            required_argument, 0, 'C'},
+      {"language",            required_argument, 0, 'L'},
       {"fplm",                required_argument, 0, 'f'},
       {"form_column",         required_argument, 0, 'F'},
       {"pos_column",          required_argument, 0, 'P'},
-      {"maca_data_path",      required_argument, 0, 'M'}
+      {"maca_data_path",      required_argument, 0, 'D'}
     };
   optind = 0;
   opterr = 0;
   
-  while ((c = getopt_long (argc, argv, "hvdi:f:m:C:M:F:P:", long_options, &option_index)) != -1){ 
+  while ((c = getopt_long (argc, argv, "hvdi:f:m:L:M:F:D:", long_options, &option_index)) != -1){ 
     switch (c)
       {
       case 'd':
@@ -124,10 +124,10 @@ context *context_read_options(int argc, char *argv[])
       case 'm':
 	ctx->mcd_filename = strdup(optarg);
 	break;
-      case 'C':
+      case 'L':
 	ctx->language = strdup(optarg);
 	break;
-      case 'M':
+      case 'D':
 	ctx->maca_data_path = strdup(optarg);
 	break;
       }
diff --git a/maca_lemmatizer/src/maca_lemmatizer.c b/maca_lemmatizer/src/maca_lemmatizer.c
index b748e7b..702b691 100644
--- a/maca_lemmatizer/src/maca_lemmatizer.c
+++ b/maca_lemmatizer/src/maca_lemmatizer.c
@@ -52,6 +52,8 @@ char **read_fplm_file(char *fplm_filename, hash *form_pos_ht)
 
   while(!feof(f)){ 
     fields_nb = fscanf(f, "%[^\t]\t%s\t%[^\t]\t%s\n", form, pos, lemma, morpho);
+    /* if(!strcmp(form, "d")) */
+      /* fprintf(stderr, "form = %s pos = %s lemma = %s\n", form, pos, lemma); */
     if(fields_nb != 4){
       fprintf(stderr, "incorrect fplm entry, skipping it\n");
       continue;
-- 
GitLab