linxy commited on
Commit
8ee5795
1 Parent(s): 7475c22

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +21 -21
README.md CHANGED
@@ -5,7 +5,7 @@ task_categories:
5
  language:
6
  - en
7
  size_categories:
8
- - 1M<n<10M
9
  ---
10
 
11
  TL;DR: The datasets for the temporal knowledge graph reasoning task.
@@ -25,21 +25,21 @@ See also: [[ICEWS14]](https://huggingface.co/datasets/linxy/ICEWS14) [[ICEWS05_1
25
  ```python
26
  >>> dataset = load_dataset("linxy/GDELT", "all")
27
  >>> len(dataset["train"]) + len(dataset["validation"]) + len(dataset["test"])
28
- 1088769
29
  >>> dataset["train"][0]
30
- {'query_name': 'Pe_aPt',
31
- 'definition': 'def Pe_aPt(e1, r1, e2, r2, e3): return Pe(e1, r1, after(Pt(e2, r2, e3)))',
32
- 'query': [6291, 372, 5683, 283, 5264],
33
- 'answer': [1077],
34
- 'easy_answer': [],
35
- 'args': ['e1', 'r1', 'e2', 'r2', 'e3']}
36
- >>> dataset["test"][0]
37
  {'query_name': 'Pe',
38
  'definition': 'def Pe(e1, r1, t1): return Pe(e1, r1, t1)',
39
- 'query': [1426, 115, 28],
40
- 'answer': [3697],
41
  'easy_answer': [],
42
  'args': ['e1', 'r1', 't1']}
 
 
 
 
 
 
 
43
  ```
44
 
45
  'args' is the argument list of the query function, where name starting with 'e' is entity, and 'r' for relation, 't' for timestamp.
@@ -53,14 +53,14 @@ Therefore, we use the code below to load meta info which contains the vocabulary
53
  >>> dataset = load_dataset("linxy/GDELT", "meta")
54
  >>> meta_info = dataset_meta["train"][0]
55
  >>> meta_info
56
- {'dataset': 'ICEWS14',
57
- 'entity_count': 7128,
58
- 'relation_count': 230,
59
- 'timestamp_count': 365,
60
- 'valid_triples_count': 8941,
61
- 'test_triples_count': 8963,
62
- 'train_triples_count': 72826,
63
- 'triple_count': 90730,
64
  'query_meta': {'query_name': [...], 'queries_count': [...], 'avg_answers_count': [...], ...},
65
  'entity2idx': {'name': [...], 'id': [...]},
66
  'relation2idx': {'name': [...], 'id': [...]},
@@ -71,7 +71,7 @@ Since the ids in the vocabulary are already sorted, we directly decode to access
71
 
72
  ```python
73
  >>> query
74
- [1426, 115, 28]
75
  >>> args
76
  ['e1', 'r1', 't1']
77
  >>> for idx, arg_type in zip(query, args):
@@ -215,4 +215,4 @@ Please condiser citing this paper if you use the ```code``` or ```data``` from o
215
 
216
  TFLEX is released under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) license.
217
 
218
- <p align="right">(<a href="#top">back to top</a>)</p>
 
5
  language:
6
  - en
7
  size_categories:
8
+ - 10M<n<100M
9
  ---
10
 
11
  TL;DR: The datasets for the temporal knowledge graph reasoning task.
 
25
  ```python
26
  >>> dataset = load_dataset("linxy/GDELT", "all")
27
  >>> len(dataset["train"]) + len(dataset["validation"]) + len(dataset["test"])
28
+ 22117475
29
  >>> dataset["train"][0]
 
 
 
 
 
 
 
30
  {'query_name': 'Pe',
31
  'definition': 'def Pe(e1, r1, t1): return Pe(e1, r1, t1)',
32
+ 'query': [483, 18, 217],
33
+ 'answer': [26, 33, 40, 45, 65, 105, 107, 121, 139, 172, 187, 216, 264, 270, 313, 460, 480, 493],
34
  'easy_answer': [],
35
  'args': ['e1', 'r1', 't1']}
36
+ >>> dataset["test"][0]
37
+ {'query_name': 'Pe2',
38
+ 'definition': 'def Pe2(e1, r1, t1, r2, t2): return Pe(Pe(e1, r1, t1), r2, t2)',
39
+ 'query': [242, 38, 229, 1, 244],
40
+ 'answer': [9, 11, 24, 46, 76, 121, 140, 146, 209, 275, 280, 300, 380, 445, 463, 484],
41
+ 'easy_answer': [9, 11, 24, 46, 76, 146, 280, 300, 380, 445, 484],
42
+ 'args': ['e1', 'r1', 't1', 'r2', 't2']}
43
  ```
44
 
45
  'args' is the argument list of the query function, where name starting with 'e' is entity, and 'r' for relation, 't' for timestamp.
 
53
  >>> dataset = load_dataset("linxy/GDELT", "meta")
54
  >>> meta_info = dataset_meta["train"][0]
55
  >>> meta_info
56
+ {'dataset': 'GDELT',
57
+ 'entity_count': 500,
58
+ 'relation_count': 20,
59
+ 'timestamp_count': 366,
60
+ 'valid_triples_count': 330906,
61
+ 'test_triples_count': 330845,
62
+ 'train_triples_count': 2308165,
63
+ 'triple_count': 2969916,
64
  'query_meta': {'query_name': [...], 'queries_count': [...], 'avg_answers_count': [...], ...},
65
  'entity2idx': {'name': [...], 'id': [...]},
66
  'relation2idx': {'name': [...], 'id': [...]},
 
71
 
72
  ```python
73
  >>> query
74
+ [483, 18, 217]
75
  >>> args
76
  ['e1', 'r1', 't1']
77
  >>> for idx, arg_type in zip(query, args):
 
215
 
216
  TFLEX is released under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) license.
217
 
218
+ <p align="right">(<a href="#top">back to top</a>)</p>