Skip to content

Commit

Permalink
0.8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
andrefs committed Jan 9, 2024
1 parent 27144a3 commit ee6f0b6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "punuy-eval",
"version": "0.8.2",
"version": "0.8.3",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
10 changes: 5 additions & 5 deletions src/lib/experiments/prior-knowledge/dsValuesExactMatches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ async function validateTrial(ds: DatasetProfile, data: string) {
const w2 = row.term2.toLowerCase();

let score: string;
if ("value" in row && typeof row.value === 'number') {
if ("value" in row && typeof row.value === "number") {
score = row.value.toString();
} else {
const values = row.values!.filter((v) => typeof v === 'number') as number[];
score = (
values.reduce((a, b) => a + b, 0) / values.length
).toString();
const values = row.values!.filter(
v => typeof v === "number"
) as number[];
score = (values.reduce((a, b) => a + b, 0) / values.length).toString();
}

res[w1] = res[w1] || {};
Expand Down

0 comments on commit ee6f0b6

Please sign in to comment.