Skip to content
Snippets Groups Projects
Commit 1e9062bb authored by robin.perrotin's avatar robin.perrotin
Browse files

.

parent bdb9a22f
No related branches found
No related tags found
No related merge requests found
...@@ -151,9 +151,10 @@ void simple_decoder_parser_arc_eager(context *ctx) ...@@ -151,9 +151,10 @@ void simple_decoder_parser_arc_eager(context *ctx)
int index; int index;
float score; float score;
double sumExp = -1; double sumExp = 0;
double currentSumExp = 0.; double currentSumExp = 0;
double ScoreTranslation = -10.; double ScoreTranslation = -10.;
int FlagNotInitExp = 1;
word* word_scored; word* word_scored;
...@@ -195,11 +196,11 @@ void simple_decoder_parser_arc_eager(context *ctx) ...@@ -195,11 +196,11 @@ void simple_decoder_parser_arc_eager(context *ctx)
if(b1 && b2 && b3){ if(b1 && b2 && b3){
printf("\n*** %f %f %d %f \n",ScoreTranslation,vcode_array[i].score, i, sumExp); printf("\n*** %f %f %d %f \n",ScoreTranslation,vcode_array[i].score, i, sumExp);
if(sumExp + 0.5 < 0){ if(FlagNotInitExp){
printf(" %f %f %d ",ScoreTranslation,vcode_array[i].score, i); printf(" %f %f %d ",ScoreTranslation,vcode_array[i].score, i);
ScoreTranslation += vcode_array[i].score; ScoreTranslation += vcode_array[i].score;
printf(" %f " ,ScoreTranslation); printf(" %f " ,ScoreTranslation);
sumExp = 0; FlagNotInitExp = 0;
} }
if(vcode_array[i].score - ScoreTranslation > 0){ if(vcode_array[i].score - ScoreTranslation > 0){
sumExp += exp(vcode_array[i].score - ScoreTranslation); sumExp += exp(vcode_array[i].score - ScoreTranslation);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment