The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
C StackOverflow Knowledge Graph
Summary
This Hugging Face dataset repository contains the C 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
README.md
schema.nt
c/
part0.nt
part1.nt
...
README.md: Hugging Face dataset card rendered from this template.schema.nt: shared ontology and schema triples.c/part*.nt: C 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 C 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 c/ into an RDF-capable store. Map language triples to named graph:
http://stackoverflow.com/c
Example language-scoped query:
SELECT ?s ?p ?o
WHERE {
GRAPH <http://stackoverflow.com/c> {
?s ?p ?o
}
}
LIMIT 100
Restore With Stack2Graph
You do not need to rebuild triples from XML to use this dataset.
Typical workflow:
- Clone Stack2Graph and configure
.envwith service paths and an HF token. - Start local services:
docker compose up -d
- Download and prepare the knowledge graph service state:
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.
- Downloads last month
- 183