Skip to content

Commit

Permalink
Add bindings and test for CIRAL dev topics (#2258)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mofetoluwa authored Nov 12, 2023
1 parent 5ae40e9 commit d9ea781
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/main/java/io/anserini/search/topicreader/Topics.java
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,12 @@ public enum Topics {
ATOMIC_V021_FACEBOOK_FLAVA_FULL_TEXT_VAL(JsonStringTopicReader.class, "topics.atomic.validation.text.facebook.flava-full.jsonl"),
ATOMIC_V021_FACEBOOK_FLAVA_FULL_IMAGE_VAL(JsonStringTopicReader.class, "topics.atomic.validation.image.facebook.flava-full.jsonl"),

// CIRAL Queries
CIRAL_V10_HA_DEV_MONO(TsvIntTopicReader.class, "topics.ciral-v1.0-ha-dev-native.tsv"),
CIRAL_V10_SO_DEV_MONO(TsvIntTopicReader.class, "topics.ciral-v1.0-so-dev-native.tsv"),
CIRAL_V10_SW_DEV_MONO(TsvIntTopicReader.class, "topics.ciral-v1.0-sw-dev-native.tsv"),
CIRAL_V10_YO_DEV_MONO(TsvIntTopicReader.class, "topics.ciral-v1.0-yo-dev-native.tsv"),

// unused topics
CACM(CacmTopicReader.class, "topics.cacm.txt"),
NTCIR_EN_1(NtcirTopicReader.class, "topics.www1.english.txt"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void testIterateThroughAllEnums() {
String path = topic.path;
assertEquals(topic.readerClass, TopicReader.getTopicReaderClassByFile(path));
}
assertEquals(379, cnt);
assertEquals(383, cnt);
}

@Test
Expand Down Expand Up @@ -1947,4 +1947,12 @@ public void testMIRACLTopics() throws IOException {
assertEquals(305, TopicReader.getTopics(Topics.MIRACL_V10_DE_DEV).keySet().size());
assertEquals(119, TopicReader.getTopics(Topics.MIRACL_V10_YO_DEV).keySet().size());
}

@Test
public void testCIRALTopics() throws IOException {
assertEquals(10, TopicReader.getTopics(Topics.CIRAL_V10_HA_DEV_MONO).keySet().size());
assertEquals(10, TopicReader.getTopics(Topics.CIRAL_V10_SO_DEV_MONO).keySet().size());
assertEquals(10, TopicReader.getTopics(Topics.CIRAL_V10_SW_DEV_MONO).keySet().size());
assertEquals(10, TopicReader.getTopics(Topics.CIRAL_V10_YO_DEV_MONO).keySet().size());
}
}

0 comments on commit d9ea781

Please sign in to comment.