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

.

parent 89b92463
Branches
No related tags found
No related merge requests found
...@@ -151,7 +151,7 @@ void simple_decoder_parser_arc_eager(context *ctx) ...@@ -151,7 +151,7 @@ void simple_decoder_parser_arc_eager(context *ctx)
int index; int index;
float score; float score;
double sumExp = 0.; double sumExp = -1.;
double currentSumExp = 0.; double currentSumExp = 0.;
double ScoreTranslation = -150.; double ScoreTranslation = -150.;
...@@ -194,8 +194,9 @@ void simple_decoder_parser_arc_eager(context *ctx) ...@@ -194,8 +194,9 @@ void simple_decoder_parser_arc_eager(context *ctx)
int b3 = respect_buffer_constraint(ctx->partial_mode, c, movement_parser_type(vcode_array[i].class_code), movement_parser_label(vcode_array[i].class_code)); int b3 = respect_buffer_constraint(ctx->partial_mode, c, movement_parser_type(vcode_array[i].class_code), movement_parser_label(vcode_array[i].class_code));
if(b1 && b2 && b3){ if(b1 && b2 && b3){
if(sumExp == 0.){ if(sumExp < 0.){
ScoreTranslation += vcode_array[i].score; ScoreTranslation += vcode_array[i].score;
sumExp = 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