now comments get evaluated correctly, not just

base on bleu score but also on location of file and line number
This commit is contained in:
Karma Riuk
2025-05-21 13:29:40 +02:00
parent 623532f5af
commit dd58d962ac
6 changed files with 109 additions and 13 deletions

View File

@ -108,6 +108,7 @@ table thead {
table thead th {
padding: 8px;
white-space: nowrap;
}
table thead th:hover {
@ -146,8 +147,18 @@ table tbody td:nth-child(1) {
white-space: nowrap;
}
/* style score column values */
/* style correct file column values */
.results-container#comment table tbody td:nth-child(3) {
text-align: center;
}
/* style distance column values */
.results-container#comment table tbody td:nth-child(4) {
text-align: right;
}
/* style distance column values */
.results-container#comment table tbody td:nth-child(5) {
text-align: right;
}

View File

@ -92,6 +92,8 @@
<tr>
<th>id</th>
<th>Proposed comment</th>
<th>Correct file</th>
<th>Distance</th>
<th>Max bleu score</th>
</tr>
</thead>

View File

@ -37,14 +37,18 @@ function populateCommentTable(results) {
const row = tbody.insertRow();
const idCell = row.insertCell();
const commentCell = row.insertCell();
const pathCell = row.insertCell();
const distanceCell = row.insertCell();
const scoreCell = row.insertCell();
const span = document.createElement("span");
idCell.textContent = id;
span.className = "comment-cell";
span.textContent = info["proposed_comment"];
span.textContent = info["proposed_comment"].body;
commentCell.appendChild(span);
scoreCell.textContent = info["max_bleu_score"].toFixed(2);
pathCell.textContent = info["correct_file"] ? tick : cross;
distanceCell.textContent = info["distance"];
});
}