PUGG_KG / README.md
asawczyn's picture
Upload folder using huggingface_hub
1e72534 verified
|
raw
history blame
5.49 kB
metadata
annotations_creators: []
language_creators: []
language:
  - pl
  - en
license:
  - cc-by-sa-4.0
multilinguality:
  - monolingual
  - multilingual
size_categories: []
source_datasets:
  - found
task_categories: []
task_ids: []
pretty_name: 'PUGG: KG for KBQA task in Polish'
tags:
  - knowledge graph
  - KBQA
  - wikipedia
  - wikidata
configs:
  - config_name: 1H_triples
    data_files:
      - split: train
        path: 1/triples.jsonl
  - config_name: 1H_attributes
    data_files:
      - split: train
        path: 1/attributes.jsonl
  - config_name: 1H_labels_en
    data_files:
      - split: train
        path: 1/labels_en.jsonl
  - config_name: 1H_descriptions
    data_files:
      - split: train
        path: 1/descriptions.jsonl
  - config_name: 1H_aliases
    data_files:
      - split: train
        path: 1/aliases.jsonl
  - config_name: 1H_labels_pl
    data_files:
      - split: train
        path: 1/labels_pl.jsonl
  - config_name: 1H_times
    data_files:
      - split: train
        path: 1/times.jsonl
  - config_name: 2H_triples
    data_files:
      - split: train
        path: 2/triples.jsonl
  - config_name: 2H_attributes
    data_files:
      - split: train
        path: 2/attributes.jsonl
  - config_name: 2H_labels_en
    data_files:
      - split: train
        path: 2/labels_en.jsonl
  - config_name: 2H_descriptions
    data_files:
      - split: train
        path: 2/descriptions.jsonl
  - config_name: 2H_aliases
    data_files:
      - split: train
        path: 2/aliases.jsonl
  - config_name: 2H_labels_pl
    data_files:
      - split: train
        path: 2/labels_pl.jsonl
  - config_name: 2H_times
    data_files:
      - split: train
        path: 2/times.jsonl

PUGG: KBQA, MRC, IR Dataset for Polish

Description

This repository contains the knowledge graph dedicated for the KBQA (Knowledge Base Question Answering) task within the PUGG dataset. This repository does not contain directly any task, but it provides the knowledge graph that can be used to solve the KBQA task from the PUGG dataset.

Graphs

We provide sampled versions of the knowledge graph based on Wikidata:

  • Wikidata1H: A subgraph created by traversing 1 relation from each answer and topic entity.
  • Wikidata2H: A subgraph created by traversing 2 relations from each answer and topic entity.

How We Created the Graphs

  1. We used the Wikidata dump from 2023-10-16. The dump is available on S3 via the DVC tool (see code repository).
  2. We collected all answer and topic entities from the PUGG dataset.
  3. We traversed the graph from each answer and topic entity for n hops.
  4. We filtered out entities that do not have labels in Polish.
  5. We saved the subgraphs in various structures:
    • triples
    • labels_pl
    • labels_en
    • aliases (Polish)
    • descriptions (Polish)
    • attributes
    • times

See Usage for more information on how to load the graphs.

Paper

For more detailed information, please refer to our research paper titled:

"Developing PUGG for Polish: A Modern Approach to KBQA, MRC, and IR Dataset Construction"

Authored by:

  • Albert Sawczyn
  • Katsiaryna Viarenich
  • Konrad Wojtasik
  • Aleksandra Domogała
  • Marcin Oleksy
  • Maciej Piasecki
  • Tomasz Kajdanowicz

The paper was accepted for ACL 2024 (findings).

Repositories

The PUGG dataset is available in the following repositories:

  • General - contains all tasks (KBQA, MRC, IR)

For more straightforward usage, the tasks are also available in separate repositories:

The knowledge graph for KBQA task is available in the following repository:

Links

  • Code:
  • Paper:
    • ACL - TBA
    • Arxiv - TBA

Usage

from datasets import load_dataset

dataset_1H_triples = load_dataset("clarin-pl/PUGG_KG", '1H_triples')
print(dataset_1H_triples)

dataset_1H_labels_pl = load_dataset("clarin-pl/PUGG_KG", '1H_labels_pl')
print(dataset_1H_labels_pl)

dataset_1H_labels_en = load_dataset("clarin-pl/PUGG_KG", '1H_labels_en')
print(dataset_1H_labels_en)

dataset_1H_aliases = load_dataset("clarin-pl/PUGG_KG", '1H_aliases')
print(dataset_1H_aliases)

dataset_1H_descriptions = load_dataset("clarin-pl/PUGG_KG", '1H_descriptions')
print(dataset_1H_descriptions)

dataset_1H_attributes = load_dataset("clarin-pl/PUGG_KG", '1H_attributes')
print(dataset_1H_attributes)

dataset_1H_times = load_dataset("clarin-pl/PUGG_KG", '1H_times')
print(dataset_1H_times)

dataset_2H_triples = load_dataset("clarin-pl/PUGG_KG", '2H_triples')
print(dataset_2H_triples)

dataset_2H_labels_pl = load_dataset("clarin-pl/PUGG_KG", '2H_labels_pl')
print(dataset_2H_labels_pl)

dataset_2H_labels_en = load_dataset("clarin-pl/PUGG_KG", '2H_labels_en')
print(dataset_2H_labels_en)

dataset_2H_aliases = load_dataset("clarin-pl/PUGG_KG", '2H_aliases')
print(dataset_2H_aliases)

dataset_2H_descriptions = load_dataset("clarin-pl/PUGG_KG", '2H_descriptions')
print(dataset_2H_descriptions)

dataset_2H_attributes = load_dataset("clarin-pl/PUGG_KG", '2H_attributes')
print(dataset_2H_attributes)

dataset_2H_times = load_dataset("clarin-pl/PUGG_KG", '2H_times')
print(dataset_2H_times)

Citation

TBA

Contact

[email protected]