Skip to content

Commit

Permalink
Add Gar-T5 topics to prebuilt (#2044)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurChen189 authored Jan 10, 2023
1 parent f417654 commit 732cba4
Show file tree
Hide file tree
Showing 10 changed files with 59,717 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/main/java/io/anserini/search/topicreader/Topics.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ public enum Topics {
DPR_SQUAD_TEST(DprJsonlTopicReader.class, "topics-and-qrels/topics.dpr.squad.test.txt"),
NQ_DEV(DprNqTopicReader.class, "topics-and-qrels/topics.nq.dev.txt"),
NQ_TEST(DprNqTopicReader.class, "topics-and-qrels/topics.nq.test.txt"),
NQ_TEST_GART5_ANSWERS(TsvIntTopicReader.class, "topics-and-qrels/topics.nq.test.gar-t5.answers.tsv"),
NQ_TEST_GART5_TITLES(TsvIntTopicReader.class, "topics-and-qrels/topics.nq.test.gar-t5.titles.tsv"),
NQ_TEST_GART5_SENTENCES(TsvIntTopicReader.class, "topics-and-qrels/topics.nq.test.gar-t5.sentences.tsv"),
NQ_TEST_GART5_ALL(TsvIntTopicReader.class, "topics-and-qrels/topics.nq.test.gar-t5.all.tsv"),
DPR_TRIVIA_TEST_GART5_ANSWERS(TsvIntTopicReader.class, "topics-and-qrels/topics.dpr.trivia.test.gar-t5.answers.tsv"),
DPR_TRIVIA_TEST_GART5_TITLES(TsvIntTopicReader.class, "topics-and-qrels/topics.dpr.trivia.test.gar-t5.titles.tsv"),
DPR_TRIVIA_TEST_GART5_SENTENCES(TsvIntTopicReader.class, "topics-and-qrels/topics.dpr.trivia.test.gar-t5.sentences.tsv"),
DPR_TRIVIA_TEST_GART5_ALL(TsvIntTopicReader.class, "topics-and-qrels/topics.dpr.trivia.test.gar-t5.all.tsv"),
MRTYDI_V11_AR_TRAIN(TsvIntTopicReader.class, "topics-and-qrels/topics.mrtydi-v1.1-ar.train.txt.gz"),
MRTYDI_V11_AR_DEV(TsvIntTopicReader.class, "topics-and-qrels/topics.mrtydi-v1.1-ar.dev.txt.gz"),
MRTYDI_V11_AR_TEST(TsvIntTopicReader.class, "topics-and-qrels/topics.mrtydi-v1.1-ar.test.txt.gz"),
Expand Down
11,313 changes: 11,313 additions & 0 deletions src/main/resources/topics-and-qrels/topics.dpr.trivia.test.gar-t5.all.tsv

Large diffs are not rendered by default.

11,313 changes: 11,313 additions & 0 deletions src/main/resources/topics-and-qrels/topics.dpr.trivia.test.gar-t5.answers.tsv

Large diffs are not rendered by default.

11,313 changes: 11,313 additions & 0 deletions src/main/resources/topics-and-qrels/topics.dpr.trivia.test.gar-t5.sentences.tsv

Large diffs are not rendered by default.

11,313 changes: 11,313 additions & 0 deletions src/main/resources/topics-and-qrels/topics.dpr.trivia.test.gar-t5.titles.tsv

Large diffs are not rendered by default.

3,610 changes: 3,610 additions & 0 deletions src/main/resources/topics-and-qrels/topics.nq.test.gar-t5.all.tsv

Large diffs are not rendered by default.

3,610 changes: 3,610 additions & 0 deletions src/main/resources/topics-and-qrels/topics.nq.test.gar-t5.answers.tsv

Large diffs are not rendered by default.

3,610 changes: 3,610 additions & 0 deletions src/main/resources/topics-and-qrels/topics.nq.test.gar-t5.sentences.tsv

Large diffs are not rendered by default.

3,610 changes: 3,610 additions & 0 deletions src/main/resources/topics-and-qrels/topics.nq.test.gar-t5.titles.tsv

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void testIterateThroughAllEnums() {
String[] pathParts = topic.path.split("/");
assertEquals(topic.readerClass, TopicReader.getTopicReaderClassByFile(pathParts[1]));
}
assertEquals(307, cnt);
assertEquals(315, cnt);
}

@Test
Expand Down Expand Up @@ -617,6 +617,22 @@ public void testNq() {
assertEquals("who sings gimme shelter with mick jagger", topics.get(1756).get("title"));
}

@Test
public void testGarT5Nq() {
assertEquals(3610, TopicReader.getTopics(Topics.NQ_TEST_GART5_ANSWERS).keySet().size());
assertEquals(3610, TopicReader.getTopics(Topics.NQ_TEST_GART5_TITLES).keySet().size());
assertEquals(3610, TopicReader.getTopics(Topics.NQ_TEST_GART5_SENTENCES).keySet().size());
assertEquals(3610, TopicReader.getTopics(Topics.NQ_TEST_GART5_ALL).keySet().size());
}

@Test
public void testGarT5Trivia() {
assertEquals(11313, TopicReader.getTopics(Topics.DPR_TRIVIA_TEST_GART5_ANSWERS).keySet().size());
assertEquals(11313, TopicReader.getTopics(Topics.DPR_TRIVIA_TEST_GART5_TITLES).keySet().size());
assertEquals(11313, TopicReader.getTopics(Topics.DPR_TRIVIA_TEST_GART5_SENTENCES).keySet().size());
assertEquals(11313, TopicReader.getTopics(Topics.DPR_TRIVIA_TEST_GART5_ALL).keySet().size());
}

@Test
public void testTREC19DL() {
SortedMap<Integer, Map<String, String>> topics;
Expand Down

0 comments on commit 732cba4

Please sign in to comment.