Source code for capreolus.collection.dummy

import os

from capreolus import constants, get_logger

from . import Collection

[docs]logger = get_logger(__name__)
[docs]PACKAGE_PATH = constants["PACKAGE_PATH"]
[docs]@Collection.register class DummyCollection(Collection): """Tiny collection for testing"""
[docs] module_name = "dummy"
_path = (PACKAGE_PATH / "data" / "dummy" / "data").as_posix()
[docs] collection_type = "TrecCollection"
[docs] generator_type = "DefaultLuceneDocumentGenerator"
def _validate_document_path(self, path): """Validate that the document path contains `dummy_trec_doc`""" return "dummy_trec_doc" in os.listdir(path)