Datasets:
Commit
·
7c8395c
1
Parent(s):
8a6ad78
Update bucc-bitext-mining.py
Browse files- bucc-bitext-mining.py +7 -2
bucc-bitext-mining.py
CHANGED
|
@@ -64,5 +64,10 @@ class BUCC(datasets.GeneratorBasedBuilder):
|
|
| 64 |
def _generate_examples(self, text_path):
|
| 65 |
"""Yields examples."""
|
| 66 |
with gzip.open(text_path,'rt') as f:
|
| 67 |
-
|
| 68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
def _generate_examples(self, text_path):
|
| 65 |
"""Yields examples."""
|
| 66 |
with gzip.open(text_path,'rt') as f:
|
| 67 |
+
data = json.load(f)
|
| 68 |
+
for i, line in enumerate(zip(data['sentence1'], data['sentence2'], data['gold'])):
|
| 69 |
+
yield i, {
|
| 70 |
+
'sentence1': line[0],
|
| 71 |
+
'sentence2': line[1],
|
| 72 |
+
'gold': line[2]
|
| 73 |
+
}
|