Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds bindings for umbrela qrel #2629

Merged
merged 2 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main/java/io/anserini/eval/Qrels.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public enum Qrels {
TREC2022_DL_DOC_MSMARCO_V21("qrels.dl22-doc-msmarco-v2.1.txt"),
TREC2023_DL_DOC_MSMARCO_V21("qrels.dl23-doc-msmarco-v2.1.txt"),
TREC2024_RAG_RAGGY_DEV("qrels.rag24.raggy-dev.txt"),
TREC2024_RAG_UMBRELA("qrels.rag24.test-umbrela-all.txt"),
MSMARCO_DOC_DEV("qrels.msmarco-doc.dev.txt"),
MSMARCO_PASSAGE_DEV_SUBSET("qrels.msmarco-passage.dev-subset.txt"),
MSMARCO_V2_DOC_DEV("qrels.msmarco-v2-doc.dev.txt"),
Expand Down
24 changes: 23 additions & 1 deletion src/test/java/io/anserini/eval/RelevanceJudgmentsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public int getQrelsCount(RelevanceJudgments qrels) throws IOException{

@Test
public void testTotalCount() {
assertEquals(170, Qrels.values().length);
assertEquals(171, Qrels.values().length);
}

@Test(expected = IOException.class)
Expand Down Expand Up @@ -386,6 +386,28 @@ public void testTREC24_RAG_RAGGY_DEV() throws IOException{
assertEquals(1, qrels.getRelevanceGrade("253263", "msmarco_v2.1_doc_46_843492186"));
}

@Test
public void testTREC24_RAG_UMBRELA() throws IOException{
// % cut -f 1 -d ' ' tools/topics-and-qrels/qrels.rag24.test-umbrela-all.txt | uniq | wc
// 301 301 3448
// % wc tools/topics-and-qrels/qrels.rag24.raggy-dev.txt
// 108479 433916 6475451 tools/topics-and-qrels/qrels.rag24.test-umbrela-all.txt

RelevanceJudgments qrels = new RelevanceJudgments("tools/topics-and-qrels/qrels.rag24.test-umbrela-all.txt");
assertNotNull(qrels);
assertEquals(301, qrels.getQids().size());
assertEquals(108479, getQrelsCount(qrels));
assertEquals(1, qrels.getRelevanceGrade("2024-145979", "msmarco_v2.1_doc_25_771726319#13_1477564195"));
assertEquals(1, qrels.getRelevanceGrade("2024-216592", "msmarco_v2.1_doc_52_1092442741#3_2165187686"));

qrels = RelevanceJudgments.fromQrels(Qrels.TREC2024_RAG_UMBRELA);
assertNotNull(qrels);
assertEquals(301, qrels.getQids().size());
assertEquals(108479, getQrelsCount(qrels));
assertEquals(1, qrels.getRelevanceGrade("2024-145979", "msmarco_v2.1_doc_25_771726319#13_1477564195"));
assertEquals(1, qrels.getRelevanceGrade("2024-216592", "msmarco_v2.1_doc_52_1092442741#3_2165187686"));
}

@Test
public void testMsmarcoDocDev() throws IOException{
RelevanceJudgments qrels = new RelevanceJudgments("tools/topics-and-qrels/qrels.msmarco-doc.dev.txt");
Expand Down
2 changes: 1 addition & 1 deletion tools
Loading