Datasets:
Update StackOverflow KG dataset card: bash
Browse files12 unmodified lines13141516171819202122232425262728293031323334351 unmodified line373839404142434445464748495051525354555657585960616263646566677 unmodified lines7576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113212 unmodified lines- 100M<n<1B---# Bash StackOverflow Knowledge Graph Datasheet## 1. What This Dataset IsThis dataset is the Bash-specific RDF shard of the Stack2Graph StackOverflow Knowledge Graph.Each Hugging Face dataset repository contains exactly one language dataset.It is optimized for graph-based retrieval and SPARQL analytics (not row-wise tabular training input).It is used in the Stack2Graph paper for evaluating retrieval-based question answering and knowledge graph research on programming topics.See the Stack2Graph repository for more details:[https://github.com/tha-atlas/Stack2Graph](https://github.com/tha-atlas/Stack2Graph)## 2. Repository Layout```textschema.ntbash/part0.nt1 unmodified line...```- `schema.nt`: shared ontology and schema triples.- `bash/part*.nt`: language-scoped instance triples serialized as N-Triples.## 3. Data Model And CoverageThe graph links Stack Overflow entities and relations, including:- questions- answers- comments- tags- vote aggregates- question-to-question linksCoverage scope:- records are retained when they match the Stack2Graph supported language-tag set- this repository contains only the Bash shard## 4. Recommended Preprocessing1. Load `schema.nt` and all triples from `bash/` into an RDF-capable store.2. Map language triples to named graph `http://stackoverflow.com/bash`.3. Keep schema triples available for graph-aware query planning.4. Preserve attribution and license metadata during downstream export.Example language-scoped query:7 unmodified linesLIMIT 100```## 5. Automatic Download And KG SetupYou do not need to rebuild triples from XML to use this dataset.In the Stack2Graph repository, you can use the automation script`experiment/load_hf_datasets_into_services.py` to download dataset artifactsand prepare the knowledge graph service state automatically.Typical workflow:1. Clone and configure Stack2Graph (`.env` with HF token and service paths).1. Start required local services:```bashdocker compose up -d```1. Run the loader script:```bashpython -m experiment.load_hf_datasets_into_services```For manual usage without automation, you can directly load `schema.nt` and alltriples from `bash/` into your RDF store.## 6. Quality Notes And Caveats- A Stack Overflow question may belong to multiple language shards when tagged with multiple languages.- Vote information is represented as aggregates, not raw individual vote events.- As with community-generated data, content may include noise, bias, and temporal drift.## 7. Intended Use- retrieval and question-answering systems- RAG and hybrid retriever experiments- knowledge graph benchmarking and diagnostics- language-scoped developer tooling research## 8. Limitations- Not a complete mirror of all Stack Overflow content.- Not all moderation context or full revision history is represented.- Best used with graph infrastructure that supports named graphs and SPARQL.## 9. Licensing And AttributionThis dataset inherits Stack Overflow source licensing and attribution requirements.Ensure compliant attribution and redistribution practices in all derived artifacts.## 10. Suggested CitationIf you use this dataset, cite the Stack2Graph work:- Stack2Graph: A Structured Knowledge Representation of Stack Overflow Data for Retrieval-based Question Answering12 unmodified lines131415161718192021222324252627282930313233341 unmodified line3637383940414243444546474849505152535455565758596061626364657 unmodified lines73747576777879808182838485868788899091929394959697989910010110210310410510610710810911012 unmodified lines- 100M<n<1B---# Bash StackOverflow Knowledge Graph## SummaryThis Hugging Face dataset repository contains the Bash 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](https://github.com/tha-atlas/Stack2Graph)## Hugging Face Repository Layout```textREADME.mdschema.ntbash/part0.nt1 unmodified line...```- `README.md`: Hugging Face dataset card rendered from this template.- `schema.nt`: shared ontology and schema triples.- `bash/part*.nt`: Bash instance triples serialized as N-Triples.## Data Model And CoverageThe 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 Bash shard- a question may appear in more than one language repository when it has multiple programming-language tags## Recommended UseUse 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 `bash/` into an RDF-capable store. Map language triples to named graph:```texthttp://stackoverflow.com/bash```Example language-scoped query:7 unmodified linesLIMIT 100```## Restore With Stack2GraphYou do not need to rebuild triples from XML to use this dataset.Typical workflow:1. Clone Stack2Graph and configure `.env` with service paths and an HF token.2. Start local services:```bashdocker compose up -d```3. Download and prepare the knowledge graph service state:```bashpython -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 AttributionThis 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.## CitationIf 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.
README.md+34-56