Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ugermann/mts
Browse files Browse the repository at this point in the history
  • Loading branch information
ugermann committed Jul 3, 2020
2 parents b72d9b8 + 0d6f1be commit 983896f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/service/quality_estimation/qe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@ namespace qe {

/// convert sentence score (log prob) to QE score
int sentence_score2qe_score(const float sentence_score) {
return 42;
// empirically defined thresholds
float thresholds[2] = {-0.24869322, -0.10945034};

if (sentence_score < thresholds[0]) {
return 3;
} else if (sentence_score > thresholds[1]) {
return 1;
} else {
return 2;
}
}

}} // end of namespace marian::qea

0 comments on commit 983896f

Please sign in to comment.