Datasets:

License:
Mofe commited on
Commit
94e0804
·
1 Parent(s): abae2fb

Update ciral.py

Browse files
Files changed (1) hide show
  1. ciral.py +2 -2
ciral.py CHANGED
@@ -53,7 +53,7 @@ def load_queries(_file):
53
  queries = {}
54
  with open(_file, encoding="utf-8") as query_file:
55
  for line in query_file:
56
- id, query = line.strip().split()
57
  queries[id] = query
58
  return queries
59
 
@@ -64,7 +64,7 @@ def load_qrels(_file):
64
  qrels = defaultdict(dict)
65
  with open(_file, encoding="utf-8") as qrel_file:
66
  for line in qrel_file:
67
- qid, _, docid, rel = line.strip().split()
68
  qrels[qid][docid] = int(rel)
69
  return qrels
70
 
 
53
  queries = {}
54
  with open(_file, encoding="utf-8") as query_file:
55
  for line in query_file:
56
+ id, query = line.strip().split('\t')
57
  queries[id] = query
58
  return queries
59
 
 
64
  qrels = defaultdict(dict)
65
  with open(_file, encoding="utf-8") as qrel_file:
66
  for line in qrel_file:
67
+ qid, _, docid, rel = line.strip().split('\t')
68
  qrels[qid][docid] = int(rel)
69
  return qrels
70