Datasets:
Dr. Jorge Abreu Vicente
commited on
Commit
·
d6a211e
1
Parent(s):
510e511
Update BLURB.py
Browse files
BLURB.py
CHANGED
|
@@ -176,13 +176,14 @@ class Blurb(datasets.GeneratorBasedBuilder):
|
|
| 176 |
}
|
| 177 |
|
| 178 |
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
|
|
|
|
|
| 176 |
}
|
| 177 |
|
| 178 |
|
| 179 |
+
def _sentsim_example_generator(self, filepath):
|
| 180 |
+
"""Yields examples as (key, example) tuples."""
|
| 181 |
+
|
| 182 |
+
df = pd.read_csv(filepath, sep="\t", encoding="utf-8")
|
| 183 |
+
for idx, row in df.iterrows():
|
| 184 |
+
yield idx, {
|
| 185 |
+
"sentence1": row["sentence1"],
|
| 186 |
+
"sentence2": row["sentence2"],
|
| 187 |
+
"score": row["score"],
|
| 188 |
+
}
|
| 189 |
+
|