CoolFace
Datasetpublic

Mo7art/Stack2Graph_KG_css

CSS StackOverflow Knowledge Graph Summary This Hugging Face dataset repository contains the CSS shard of the Stack2Graph StackOverflow Knowledge Graph. Hugging Face uses one dataset repository per programming language, so this repository is directly cloneable without an extra top-level archive wrapper. The artifact is optimized for graph-based retrieval, SPARQL analytics, and retrieval-augmented question answering over Stack Overflow content. Stack2Graph source:… See the full description on the dataset page: https://huggingface.co/datasets/Mo7art/Stack2Graph_KG_css.

sourceHugging Facecc-by-sa-4.0updated 2mo agoView on Hugging Face
0likes204downloads
Dataset Card

CSS StackOverflow Knowledge Graph

Summary

This Hugging Face dataset repository contains the CSS shard of the Stack2Graph StackOverflow Knowledge Graph. Hugging Face uses one dataset repository per programming language, so this repository is directly cloneable without an extra top-level archive wrapper.

The artifact is optimized for graph-based retrieval, SPARQL analytics, and retrieval-augmented question answering over Stack Overflow content.

Stack2Graph source: https://github.com/tha-atlas/Stack2Graph

Hugging Face Repository Layout

text
README.md
schema.nt
css/
  part0.nt
  part1.nt
  ...
  • README.md: Hugging Face dataset card rendered from this template.
  • schema.nt: shared ontology and schema triples.
  • css/part*.nt: CSS instance triples serialized as N-Triples.

Data Model And Coverage

The graph links Stack Overflow entities and relations, including questions, answers, comments, tags, vote aggregates, and question-to-question links.

Coverage scope:

  • records are retained when they match the Stack2Graph supported language-tag set
  • this repository contains only the CSS shard
  • a question may appear in more than one language repository when it has multiple programming-language tags

Recommended Use

Use this dataset for graph retrieval, SPARQL diagnostics, RAG experiments, and knowledge graph research for programming topics. It is not intended as row-wise tabular training input.

Load schema.nt and the files under css/ into an RDF-capable store. Map language triples to named graph:

text
http://stackoverflow.com/css

Example language-scoped query:

sparql
SELECT ?s ?p ?o
WHERE {
  GRAPH <http://stackoverflow.com/css> {
    ?s ?p ?o
  }
}
LIMIT 100

Restore With Stack2Graph

You do not need to rebuild triples from XML to use this dataset.

Typical workflow:

  1. 1.Clone Stack2Graph and configure .env with service paths and an HF token.
  2. 2.Start local services:
bash
docker compose up -d
  1. 1.Download and prepare the knowledge graph service state:
bash
python -m experiment.sources.hf

Quality Notes

  • Vote information is represented as aggregates, not raw individual vote events.
  • Not all moderation context or full revision history is represented.
  • Community-generated Stack Overflow content may contain errors, outdated information, bias, or temporal drift.

License And Attribution

This dataset is derived from Stack Overflow content and is distributed under CC-BY-SA-4.0. Preserve required attribution and license notices when redistributing derived artifacts.

Citation

If you use this dataset, cite the Stack2Graph project and preserve Stack Overflow attribution requirements:

  • Kleybolte, L. A., Ventura, V., & Zarcone, A. (2026). Stack2Graph: A Structured Knowledge Representation of Stack Overflow Data for Retrieval-based Question Answering . In Proceedings of the Knowledge Graphs and Large Language Models Workshop (KG-LLM) @ LREC26 (pp. 120-133). European Language Resources Association (ELRA). https://doi.org/10.63317/583q4d3mwbdu.