Datasets:

Languages:
Portuguese
Size Categories:
1M<n<10M
ArXiv:
License:
eduseiti commited on
Commit
2711aa8
1 Parent(s): 8a50793

Properly fixing the topics generation examples script.

Browse files
Files changed (1) hide show
  1. quati.py +10 -10
quati.py CHANGED
@@ -68,26 +68,26 @@ def generate_examples_qrels(filepath):
68
 
69
  with open(filepath, encoding="utf-8") as input_file:
70
  for (idx, line) in enumerate(input_file):
71
- if idx > 0:
72
- query_id, _, passage_id, score = line.rstrip().split(" ")
73
 
74
- features = {"query_id": int(query_id),
75
- "passage_id": passage_id,
76
- "score": int(score)}
77
 
78
- yield idx - 1, features
79
 
80
 
81
  def generate_examples_topics(filepath):
82
 
83
  with open(filepath, encoding="utf-8") as input_file:
84
  for (idx, line) in enumerate(input_file):
85
- query_id, query = line.rstrip().split("\t")
 
86
 
87
- features = {"query_id": int(query_id),
88
- "query": query}
89
 
90
- yield idx, features
91
 
92
 
93
 
 
68
 
69
  with open(filepath, encoding="utf-8") as input_file:
70
  for (idx, line) in enumerate(input_file):
71
+ query_id, _, passage_id, score = line.rstrip().split(" ")
 
72
 
73
+ features = {"query_id": int(query_id),
74
+ "passage_id": passage_id,
75
+ "score": int(score)}
76
 
77
+ yield idx, features
78
 
79
 
80
  def generate_examples_topics(filepath):
81
 
82
  with open(filepath, encoding="utf-8") as input_file:
83
  for (idx, line) in enumerate(input_file):
84
+ if idx > 0:
85
+ query_id, query = line.rstrip().split("\t")
86
 
87
+ features = {"query_id": int(query_id),
88
+ "query": query}
89
 
90
+ yield idx - 1, features
91
 
92
 
93