Datasets:
Update ViHOS.py
Browse files
ViHOS.py
CHANGED
|
@@ -68,12 +68,13 @@ class ViHOS(datasets.GeneratorBasedBuilder):
|
|
| 68 |
# with open(filepath, 'r', encoding="utf-8") as f:
|
| 69 |
data = pd.read_csv(filepath, names=colnames, header = None, sep=",",on_bad_lines='skip')
|
| 70 |
for i in range(len(data)):
|
| 71 |
-
|
| 72 |
Content = data.loc[i, 'Content']
|
| 73 |
Span_ids = data.loc[i, 'Span ids']
|
| 74 |
|
| 75 |
|
| 76 |
-
yield
|
|
|
|
| 77 |
"content": Content
|
| 78 |
"HOS span ids": Span_ids
|
| 79 |
}
|
|
|
|
| 68 |
# with open(filepath, 'r', encoding="utf-8") as f:
|
| 69 |
data = pd.read_csv(filepath, names=colnames, header = None, sep=",",on_bad_lines='skip')
|
| 70 |
for i in range(len(data)):
|
| 71 |
+
id_ = data.loc[i, 'id']
|
| 72 |
Content = data.loc[i, 'Content']
|
| 73 |
Span_ids = data.loc[i, 'Span ids']
|
| 74 |
|
| 75 |
|
| 76 |
+
yield id_, {
|
| 77 |
+
"id", id_,
|
| 78 |
"content": Content
|
| 79 |
"HOS span ids": Span_ids
|
| 80 |
}
|