From f03e95cd58e7fe32826d85a509c13b61723aaf05 Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Sun, 11 May 2025 09:34:40 +0200 Subject: [PATCH] using underscore instead of spaces in result obj --- public/js/index.js | 4 ++-- src/utils/process_data.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/public/js/index.js b/public/js/index.js index 5eca1c7..22563a4 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -59,8 +59,8 @@ document.getElementById("upload-btn").onclick = async () => { const scoreCell = row.insertCell(); // cell 3: bleu score idCell.textContent = id; - commentCell.innerHTML = `${info["proposed comment"]}`; - scoreCell.textContent = info["max bleu score"].toFixed(4); + commentCell.innerHTML = `${info["proposed_comment"]}`; + scoreCell.textContent = info["max_bleu_score"].toFixed(4); }); }; diff --git a/src/utils/process_data.js b/src/utils/process_data.js index 2af9fb3..641ab46 100644 --- a/src/utils/process_data.js +++ b/src/utils/process_data.js @@ -36,9 +36,9 @@ export const evaluate_comments = (answers, percent_cb) => { maxScore = Math.max(score, maxScore); } results[id] = { - "max bleu score": maxScore, - "bleu scores": scores, - "proposed comment": generated_comment, + max_bleu_score: maxScore, + bleu_scores: scores, + proposed_comment: generated_comment, }; percent_cb(Math.floor((++i / total) * 100)); }