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

.

parent 98375cb1
Branches
No related tags found
No related merge requests found
......@@ -195,10 +195,10 @@ void simple_decoder_parser_arc_eager(context *ctx)
if(b1 && b2 && b3){
if(sumExp == 0.){
sumExp += vcode_array[i].score;
ScoreTranslation += vcode_array[i].score;
}
if(vcode_array[i].score - sumExp >= 0){
sumExp += exp(vcode_array[i].score - sumExp);
if(vcode_array[i].score - ScoreTranslation >= 0){
sumExp += exp(vcode_array[i].score - ScoreTranslation);
}
}
}
......@@ -213,9 +213,9 @@ void simple_decoder_parser_arc_eager(context *ctx)
int b2 = respect_stack_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(vcode_array[i].score - sumExp >= 0){
if(vcode_array[i].score - ScoreTranslation >= 0){
printf(" [%f-",currentSumExp/sumExp));
currentSumExp += exp(vcode_array[i].score - sumExp);
currentSumExp += exp(vcode_array[i].score - ScoreTranslation);
printf("%f[", currentSumExp/sumExp));
}
printf("\t<----");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment