By clicking "Accept", you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. See our Privacy Policy for more information
Open Datasets
StackSample
Text

StackSample

StackSample is a subset of Stack Overflow that contains 10% of its questions and answers. It is a textual corpus structured in three tables (questions, answers, tags) allowing you to work on tasks such as the automatic generation of tags, the prediction of votes or the semantic analysis of the text of technical questions.

Download dataset
Size

Approximately 468,000 rows in CSV format spread over 3 tables (questions, answers, tags)

Licence

CC-BY-SA 3.0

Description

StackSample is a textual corpus extracted from Stack Overflow, including approximately 10% of the questions and answers. It includes the titles, contents, scores, scores, dates, and tags of the publications. Organized into three CSV tables (Questions, Answers, Tags), this dataset provides an excellent basis for NLP projects in connection with technical communities and natural language in a Q&A context.

What is this dataset for?

  • Train models for the automatic generation or recommendation of tags
  • Predict the success (votes, closings) of questions based on their text
  • Analyze the evolution of technologies through Stack Overflow trends

Can it be enriched or improved?

Yes, StackSample can be combined with other Stack Overflow datasets (e.g. Python, R) for targeted analyses by language. We can also enrich the examples with embeddings, summaries, or classify by technological field. Further exploration of user behavior is also possible via ownerIDs.

🔎 In summary

Criterion Evaluation
🧩 Ease of use⭐⭐⭐⭐⭐ (Clear CSV format, well-structured tables)
🧼 Need for cleaning⭐⭐⭐⭐⭐ (Low – data ready to use)
🏷️ Annotation richness⭐⭐⭐⭐✩ (Good – presence of tags, scores, and metadata)
📜 Commercial license✅ Yes (CC-BY-SA 3.0, with attribution and share-alike)
👨‍💻 Beginner friendly🌟 Yes – easy to explore and documented
🔁 Fine-tuning ready🎯 Useful for pre-training Q&A or classification models
🌍 Cultural diversity⚠️ Medium – mostly English, technical content

🧠 Recommended for

  • NLP projects
  • Recommendation engines
  • Technical community analysis

🔧 Compatible tools

  • Pandas
  • Hugging Face
  • SpacY
  • Scikit-learn
  • TensorFlow
  • PyTorch

💡 Tip

For robust models, combine the “Title” and “Body” fields and use the tags as multi-class targets.

Frequently Asked Questions

Does this dataset only contain Python questions?

No, StackSample covers a wide range of languages and technical topics from Stack Overflow.

Can this dataset be used to train a tag classification model?

Yes, the dataset is ideal for multi-category classification based on question text.

Does the dataset include accepted answers?

Yes, answers are included, along with scores, but there is no direct indicator for accepted answers.

Similar datasets

See more
Category

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.

Category

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.

Category

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.