Add latitude, longitude
Browse files- bwns.py +10 -2
- dataset_infos.json +1 -1
- train.bkp.csv +0 -0
- train.csv +2 -2
bwns.py
CHANGED
@@ -36,6 +36,8 @@ class BwnsDataset(datasets.GeneratorBasedBuilder):
|
|
36 |
"related_articles": datasets.Sequence(datasets.Value("int32")),
|
37 |
"title": datasets.Value("string"),
|
38 |
"content": datasets.Value("string"),
|
|
|
|
|
39 |
}
|
40 |
)
|
41 |
elif self.config.name == "concat":
|
@@ -49,6 +51,8 @@ class BwnsDataset(datasets.GeneratorBasedBuilder):
|
|
49 |
"related_articles": datasets.Sequence(datasets.Value("int32")),
|
50 |
"title": datasets.Value("string"),
|
51 |
"title_and_content": datasets.Value("string"),
|
|
|
|
|
52 |
}
|
53 |
)
|
54 |
return datasets.DatasetInfo(
|
@@ -83,7 +87,9 @@ class BwnsDataset(datasets.GeneratorBasedBuilder):
|
|
83 |
"city": row['city'],
|
84 |
"region": row['region'],
|
85 |
"country": row['country'],
|
86 |
-
"
|
|
|
|
|
87 |
"title": row['title'],
|
88 |
"content": row['content'],
|
89 |
}
|
@@ -94,7 +100,9 @@ class BwnsDataset(datasets.GeneratorBasedBuilder):
|
|
94 |
"city": row['city'],
|
95 |
"region": row['region'],
|
96 |
"country": row['country'],
|
97 |
-
"
|
|
|
|
|
98 |
"title": row['title'],
|
99 |
"title_and_content": f"{row['title']} {row['content']}",
|
100 |
}
|
|
|
36 |
"related_articles": datasets.Sequence(datasets.Value("int32")),
|
37 |
"title": datasets.Value("string"),
|
38 |
"content": datasets.Value("string"),
|
39 |
+
"latitude": datasets.Value("string"),
|
40 |
+
"longitude": datasets.Value("string"),
|
41 |
}
|
42 |
)
|
43 |
elif self.config.name == "concat":
|
|
|
51 |
"related_articles": datasets.Sequence(datasets.Value("int32")),
|
52 |
"title": datasets.Value("string"),
|
53 |
"title_and_content": datasets.Value("string"),
|
54 |
+
"latitude": datasets.Value("string"),
|
55 |
+
"longitude": datasets.Value("string"),
|
56 |
}
|
57 |
)
|
58 |
return datasets.DatasetInfo(
|
|
|
87 |
"city": row['city'],
|
88 |
"region": row['region'],
|
89 |
"country": row['country'],
|
90 |
+
"latitude": row['latitude'],
|
91 |
+
"longitude": row['longitude'],
|
92 |
+
"related_articles": [int(x) for x in row['related_articles'][1:-1].split(' ') if x],
|
93 |
"title": row['title'],
|
94 |
"content": row['content'],
|
95 |
}
|
|
|
100 |
"city": row['city'],
|
101 |
"region": row['region'],
|
102 |
"country": row['country'],
|
103 |
+
"latitude": row['latitude'],
|
104 |
+
"longitude": row['longitude'],
|
105 |
+
"related_articles": [int(x) for x in row['related_articles'][1:-1].split(' ') if x],
|
106 |
"title": row['title'],
|
107 |
"title_and_content": f"{row['title']} {row['content']}",
|
108 |
}
|
dataset_infos.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"original": {"description": "BWNS: The Bahai World News Service dataset.", "citation": "", "homepage": "https://news.bahai.org/", "license": "", "features": {"id": {"dtype": "int32", "id": null, "_type": "Value"}, "date": {"dtype": "timestamp[s]", "id": null, "_type": "Value"}, "city": {"dtype": "string", "id": null, "_type": "Value"}, "region": {"dtype": "string", "id": null, "_type": "Value"}, "country": {"dtype": "string", "id": null, "_type": "Value"}, "related_articles": {"feature": {"dtype": "int32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "content": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "bwns_dataset", "config_name": "original", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes":
|
|
|
1 |
+
{"original": {"description": "BWNS: The Bahai World News Service dataset.", "citation": "", "homepage": "https://news.bahai.org/", "license": "", "features": {"id": {"dtype": "int32", "id": null, "_type": "Value"}, "date": {"dtype": "timestamp[s]", "id": null, "_type": "Value"}, "city": {"dtype": "string", "id": null, "_type": "Value"}, "region": {"dtype": "string", "id": null, "_type": "Value"}, "country": {"dtype": "string", "id": null, "_type": "Value"}, "related_articles": {"feature": {"dtype": "int32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "content": {"dtype": "string", "id": null, "_type": "Value"}, "latitude": {"dtype": "string", "id": null, "_type": "Value"}, "longitude": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "bwns_dataset", "config_name": "original", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 5676943, "num_examples": 1387, "dataset_name": "bwns_dataset"}}, "download_checksums": {"./train.csv": {"num_bytes": 5671511, "checksum": "25f6c516704bfdefe0db723648498a26333191a04f378db36601f5e9ebd3d5ba"}}, "download_size": 5671511, "post_processing_size": null, "dataset_size": 5676943, "size_in_bytes": 11348454}, "concat": {"description": "BWNS: The Bahai World News Service dataset.", "citation": "", "homepage": "https://news.bahai.org/", "license": "", "features": {"id": {"dtype": "int32", "id": null, "_type": "Value"}, "date": {"dtype": "timestamp[s]", "id": null, "_type": "Value"}, "city": {"dtype": "string", "id": null, "_type": "Value"}, "region": {"dtype": "string", "id": null, "_type": "Value"}, "country": {"dtype": "string", "id": null, "_type": "Value"}, "related_articles": {"feature": {"dtype": "int32", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "title_and_content": {"dtype": "string", "id": null, "_type": "Value"}, "latitude": {"dtype": "string", "id": null, "_type": "Value"}, "longitude": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "bwns_dataset", "config_name": "concat", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 5758374, "num_examples": 1387, "dataset_name": "bwns_dataset"}}, "download_checksums": {"./train.csv": {"num_bytes": 5671511, "checksum": "25f6c516704bfdefe0db723648498a26333191a04f378db36601f5e9ebd3d5ba"}}, "download_size": 5671511, "post_processing_size": null, "dataset_size": 5758374, "size_in_bytes": 11429885}}
|
train.bkp.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|
train.csv
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:25f6c516704bfdefe0db723648498a26333191a04f378db36601f5e9ebd3d5ba
|
3 |
+
size 5671511
|