Exemple #1
0
 def _load_qrels(self, subset, fmt):
     with self.logger.duration('loading qrels'):
         base_path = util.path_dataset(self)
         path = os.path.join(base_path,
                             f'{subset}.{self.config["collection"]}.qrels')
         self.logger.info(path)
         return trec.read_qrels_fmt(path, fmt)
Exemple #2
0
 def _base_qrels(self, subset, fmt):
     fold, rnd, _ = subset.split('-', 2)
     path = os.path.join(util.path_dataset(self), f'{fold}-{rnd}.qrels')
     if os.path.exists(path):
         aaa = trec.read_qrels_fmt(path, fmt)
         return aaa
     self.logger.info(f'missing qrels for {rnd} -- returning empty qrels')
     return {}
Exemple #3
0
 def _load_qrels(self, subset, fmt):
     with logger.duration('loading qrels'):
         base_path = util.path_dataset(self)
         path = os.path.join(base_path, f'{subset}.qrels')
         return trec.read_qrels_fmt(path, fmt)
Exemple #4
0
 def _load_qrels(self, subset, fmt):
     return trec.read_qrels_fmt(
         os.path.join(util.path_dataset(self), f'{subset}.qrels'), fmt)
Exemple #5
0
 def _load_qrels(self, fmt):
     return trec.read_qrels_fmt(str(self.assessed_topics.qrels_path()), fmt)
Exemple #6
0
 def _load_qrels(self, subset, fmt):
     with self.logger.duration('loading qrels'):
         path = util.path_dataset(self)
         rel = self.config['rel']
         qrel_file = os.path.join(path, f'{subset}.{rel}.qrels')
         return trec.read_qrels_fmt(qrel_file, fmt)
Exemple #7
0
 def _load_qrels(self, subset, fmt):
     qrels_path = os.path.join(util.path_dataset(self), subset, 'qrels.txt')
     return trec.read_qrels_fmt(qrels_path, fmt)