test
Browse files
YNAT.py
CHANGED
|
@@ -65,14 +65,14 @@ class YNAT(datasets.GeneratorBasedBuilder):
|
|
| 65 |
|
| 66 |
def _generate_examples(self, data_file: str, split: str):
|
| 67 |
with open(data_file, newline='', encoding="UTF-8") as csvfile:
|
| 68 |
-
reader = csv.reader(csvfile, delimiter=
|
| 69 |
feature_names = next(reader)
|
| 70 |
idx = 0
|
| 71 |
for row in reader:
|
| 72 |
features = {
|
| 73 |
-
"input_text": row
|
| 74 |
}
|
| 75 |
-
if split != "test":
|
| 76 |
-
|
| 77 |
yield idx, features
|
| 78 |
idx += 1
|
|
|
|
| 65 |
|
| 66 |
def _generate_examples(self, data_file: str, split: str):
|
| 67 |
with open(data_file, newline='', encoding="UTF-8") as csvfile:
|
| 68 |
+
reader = csv.reader(csvfile, delimiter=",")
|
| 69 |
feature_names = next(reader)
|
| 70 |
idx = 0
|
| 71 |
for row in reader:
|
| 72 |
features = {
|
| 73 |
+
"input_text": row,
|
| 74 |
}
|
| 75 |
+
# if split != "test":
|
| 76 |
+
# features["label_text"] = row[2]
|
| 77 |
yield idx, features
|
| 78 |
idx += 1
|