task_categories:text2text-generation language:en size_categories:1M<n<10M region:us
---
task_categories:
- text2text-generation
language:
- en
pretty_name: T
size_categories:
- 1M<n<10M
---

# TempKB

## Overview

TempKB is a comprehensive collection of knowledge graph data designed to train ML models on knowledge graph completion and reasoning tasks. This is the Event version, which contains only data where the time information is presented.

## Dataset Structure

The dataset is organized into the following main components:

Train Set: 1373083 instances for training models.

Validation Set: 63421 instances for validating model performance.

Test Set: 63530 instances for final evaluation.

## Data Fields

Each instance in the dataset contains the following fields:

- `head`: the head entity
- `relation`: the relationships between the head and tail entities
- `tail`: the tail entity
- `start`: start time of the event
- `end`: end time of the event
- `type`: temporal information type, which is one of the following:
  - `NONE`: no start or end time
  - `TIMESTAMP`: start time only
  - `INTERVAL`: start and end time

## Example Instance

```json
{
  "head": "Martin Bača"
  "relation": "member of sports team"
  "tail": "Czech Republic national under-18 football team"
  "start": "2002-01-01"
  "end": "2004-01-01"
  "type": "INTERVAL"
}
```

## Usage

To use this dataset, you can load it using the Hugging Face datasets library:

```python
from datasets import load_dataset

dataset = load_dataset('ESITime/TempKB-Event', keep_default_na=False)
```

## License

This dataset is unlicensed. Feel free to use it as you want.

## Citation

If you use this dataset in your research, please cite it as follows:

```bib
@dataset{username_dataset_name_year,
  author = {Phuong Ngo},
  title = {TempKB: A collection of knowledge graph data},
  year = {2024},
  publisher = {Hugging Face},
  url = {https://huggingface.co/datasets/ESITime/TempKB-Event}
}
```

## Acknowledgement

This dataset is derived from the collection of knowledge graph datasets including ICEWS05-15, ICEWS14, Wikidata, and YAGO. The datasets are downloaded from the processed version by Facebook Research: https://github.com/facebookresearch/tkbc/