From f20e859cf19d585a81987b9a470ed3a86f9ae7b1 Mon Sep 17 00:00:00 2001
From: "robin.perrotin" <robin.perrotin@lif.univ-mrs.fr>
Date: Mon, 13 Nov 2017 05:34:20 +0100
Subject: [PATCH] .

---
 .../src/simple_decoder_parser_arc_eager.c           | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/maca_trans_parser/src/simple_decoder_parser_arc_eager.c b/maca_trans_parser/src/simple_decoder_parser_arc_eager.c
index aca5cdd..24e0bb8 100644
--- a/maca_trans_parser/src/simple_decoder_parser_arc_eager.c
+++ b/maca_trans_parser/src/simple_decoder_parser_arc_eager.c
@@ -151,10 +151,10 @@ void simple_decoder_parser_arc_eager(context *ctx)
   int index;
   float score;
   
-  double sumExp = 0;
-  double currentSumExp = 0;
-  double ScoreTranslation = -10;
-  int FlagNotInitExp = 1;
+  double sumExp;
+  double currentSumExp;
+  double ScoreTranslation;
+  int FlagNotInitExp;
   
   word* word_scored;
   
@@ -163,6 +163,11 @@ void simple_decoder_parser_arc_eager(context *ctx)
   
   c = config_new(f, ctx->mcd_struct, 5);
   while(!config_is_terminal(c)){
+    
+    sumExp = 0;
+    currentSumExp = 0;
+    ScoreTranslation = -10;
+    FlagNotInitExp = 1;
 
     if(ctx->debug_mode){
       fprintf(stdout, "***********************************\n");
-- 
GitLab