def _corpus_generator(
        self,
    ) -> Generator[Dict[str, Dict[str, str]], None, None]:
        """
        Generator to load corpus data incrementally.
        """
        self.check(fIn=self.corpus_file, ext="jsonl")

        with open(self.corpus_file, encoding="utf8") as fIn:
            for line in fIn:
                line = json.loads(line)
                yield {
                    line.get("_id"): {
                        "text": line.get("text"),
                        "title": line.get("title"),
                    }
                }

        Generator to load corpus data incrementally.
        
src/benchmark/trulens/benchmark/benchmark_frameworks/dataset/beir_loader.py