Alon Eirew
commited on
Commit
·
a3b7f11
1
Parent(s):
4d0f0f5
add code snippet
Browse files
README.md
CHANGED
|
@@ -8,6 +8,22 @@ A large-scale dataset for cross-document event coreference extracted from Englis
|
|
| 8 |
|
| 9 |
English
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
## Dataset Structure
|
| 12 |
|
| 13 |
### Data Instances
|
|
|
|
| 8 |
|
| 9 |
English
|
| 10 |
|
| 11 |
+
## Load Dataset
|
| 12 |
+
You can read in WEC-Eng files as follows (using the **huggingface_hub** library):
|
| 13 |
+
|
| 14 |
+
```json
|
| 15 |
+
from huggingface_hub import hf_hub_url, cached_download
|
| 16 |
+
import json
|
| 17 |
+
REPO_ID = "datasets/Intel/WEC-Eng"
|
| 18 |
+
splits_files = ["Dev_Event_gold_mentions_validated.json",
|
| 19 |
+
"Test_Event_gold_mentions_validated.json",
|
| 20 |
+
"Train_Event_gold_mentions.json"]
|
| 21 |
+
wec_eng = list()
|
| 22 |
+
for split_file in splits_files:
|
| 23 |
+
wec_eng.append(json.load(open(cached_download(
|
| 24 |
+
hf_hub_url(REPO_ID, split_file)), "r")))
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
## Dataset Structure
|
| 28 |
|
| 29 |
### Data Instances
|