Update README.md
Browse files
README.md
CHANGED
|
@@ -40,6 +40,32 @@ TL;DR: The datasets for the temporal knowledge graph reasoning task.
|
|
| 40 |
'args': ['e1', 'r1', 't1']}
|
| 41 |
```
|
| 42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
<details>
|
| 44 |
<summary>π π Dataset statistics: queries_count</summary>
|
| 45 |
|
|
@@ -138,6 +164,9 @@ TL;DR: The datasets for the temporal knowledge graph reasoning task.
|
|
| 138 |
|
| 139 |
<br/>
|
| 140 |
|
|
|
|
|
|
|
|
|
|
| 141 |
|
| 142 |
## π€ Citation
|
| 143 |
|
|
|
|
| 40 |
'args': ['e1', 'r1', 't1']}
|
| 41 |
```
|
| 42 |
|
| 43 |
+
'args' is the argument list of the query function, where name starting with 'e' is entity, and 'r' for relation, 't' for timestamp.
|
| 44 |
+
|
| 45 |
+
assert len(query) == len(args)
|
| 46 |
+
|
| 47 |
+
In order to decode query ids into text, we should use a vocabulary (i.e. entity2idx, relation2idx and timestamp2idx).
|
| 48 |
+
Therefore, we use the code below to load meta info which contains the vocabulary:
|
| 49 |
+
|
| 50 |
+
```python
|
| 51 |
+
>>> dataset = load_dataset("linxy/ICEWS14", "meta")
|
| 52 |
+
>>> meta_info = dataset_meta["train"][0]
|
| 53 |
+
>>> meta_info
|
| 54 |
+
{'dataset': 'ICEWS14',
|
| 55 |
+
'entity_count': 7128,
|
| 56 |
+
'relation_count': 230,
|
| 57 |
+
'timestamp_count': 365,
|
| 58 |
+
'valid_triples_count': 8941,
|
| 59 |
+
'test_triples_count': 8963,
|
| 60 |
+
'train_triples_count': 72826,
|
| 61 |
+
'triple_count': 90730,
|
| 62 |
+
'query_meta': {'query_name': [...], 'queries_count': [...], 'avg_answers_count': [...], ...},
|
| 63 |
+
'entity2idx': {'name': [...], 'id': [...]},
|
| 64 |
+
'relation2idx': {'name': [...], 'id': [...]},
|
| 65 |
+
'timestamp2idx': {'name': [...], 'id': [...]},
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
|
| 69 |
<details>
|
| 70 |
<summary>π π Dataset statistics: queries_count</summary>
|
| 71 |
|
|
|
|
| 164 |
|
| 165 |
<br/>
|
| 166 |
|
| 167 |
+
## βοΈ Contact
|
| 168 |
+
|
| 169 |
+
- Lin Xueyuan: [email protected]
|
| 170 |
|
| 171 |
## π€ Citation
|
| 172 |
|