hadikhamoud commited on
Commit
4963014
·
verified ·
1 Parent(s): a0e8332

Upload TypePrediction dataset

Browse files
Files changed (3) hide show
  1. README.md +8 -8
  2. build_type_prediction_dataset.py +8 -8
  3. push_to_hf.py +8 -2
README.md CHANGED
@@ -69,14 +69,14 @@ Example where a fine label is mapped to a coarse label:
69
  ```json
70
  {
71
  "id": "tp_001001",
72
- "entity": "قضاء رام الله",
73
- "type": "GPE",
74
- "sentence": """ ديوان قائمقام قضاء رام الله ، الى رئيس بلدية مدينة البيرة بشان المادة الخامسة من قانون الدفاع رقم "" "" 6 "" "" لسنة 1939 بتاريخ ( 9 / 7 / 1952 ) "" .",
75
- "start_token": 3,
76
- "end_token": 5,
77
- "start_char": 17,
78
- "end_char": 30,
79
- "raw_types": ["GPE", "STATE-OR-PROVINCE"],
80
  "sources": [{"dataset": "WojoodFine", "split": "train"}]
81
  }
82
  ```
 
69
  ```json
70
  {
71
  "id": "tp_001001",
72
+ "entity": "للعراقيين",
73
+ "type": "NORP",
74
+ "sentence": ", أثارت محاكمات 11 مشتبها بهم فرنسيين في العراق في مايو / أيار هذه المخاوف ، ليس فقط للمشتبه بهم الأجانب بل للعراقيين أيضا .",
75
+ "start_token": 22,
76
+ "end_token": 22,
77
+ "start_char": 108,
78
+ "end_char": 117,
79
+ "raw_types": ["NORP"],
80
  "sources": [{"dataset": "WojoodFine", "split": "train"}]
81
  }
82
  ```
build_type_prediction_dataset.py CHANGED
@@ -290,14 +290,14 @@ Example where a fine label is mapped to a coarse label:
290
  ```json
291
  {{
292
  "id": "tp_001001",
293
- "entity": "قضاء رام الله",
294
- "type": "GPE",
295
- "sentence": "\"\" ديوان قائمقام قضاء رام الله ، الى رئيس بلدية مدينة البيرة بشان المادة الخامسة من قانون الدفاع رقم \"\" \"\" 6 \"\" \"\" لسنة 1939 بتاريخ ( 9 / 7 / 1952 ) \"\" .",
296
- "start_token": 3,
297
- "end_token": 5,
298
- "start_char": 17,
299
- "end_char": 30,
300
- "raw_types": ["GPE", "STATE-OR-PROVINCE"],
301
  "sources": [{{"dataset": "WojoodFine", "split": "train"}}]
302
  }}
303
  ```
 
290
  ```json
291
  {{
292
  "id": "tp_001001",
293
+ "entity": "للعراقيين",
294
+ "type": "NORP",
295
+ "sentence": ", أثارت محاكمات 11 مشتبها بهم فرنسيين في العراق في مايو / أيار هذه المخاوف ، ليس فقط للمشتبه بهم الأجانب بل للعراقيين أيضا .",
296
+ "start_token": 22,
297
+ "end_token": 22,
298
+ "start_char": 108,
299
+ "end_char": 117,
300
+ "raw_types": ["NORP"],
301
  "sources": [{{"dataset": "WojoodFine", "split": "train"}}]
302
  }}
303
  ```
push_to_hf.py CHANGED
@@ -1,7 +1,7 @@
1
  import os
2
  from pathlib import Path
3
 
4
- from huggingface_hub import HfApi, create_repo
5
 
6
 
7
  ROOT = Path("/root/knowledgegrapheval/type_prediction_dataset")
@@ -35,7 +35,13 @@ def main():
35
  repo_type="dataset",
36
  token=token,
37
  exist_ok=True,
38
- private=True,
 
 
 
 
 
 
39
  )
40
  api = HfApi(token=token)
41
  api.upload_folder(
 
1
  import os
2
  from pathlib import Path
3
 
4
+ from huggingface_hub import HfApi, create_repo, update_repo_settings
5
 
6
 
7
  ROOT = Path("/root/knowledgegrapheval/type_prediction_dataset")
 
35
  repo_type="dataset",
36
  token=token,
37
  exist_ok=True,
38
+ private=False,
39
+ )
40
+ update_repo_settings(
41
+ repo_id=REPO_ID,
42
+ repo_type="dataset",
43
+ token=token,
44
+ private=False,
45
  )
46
  api = HfApi(token=token)
47
  api.upload_folder(