metadata
configs:
- config_name: default
data_files:
- split: train
path: stackoverflow/train_clean.csv
- config_name: raw
data_files:
- split: train
path: stackoverflow/train.csv
StackExchange Dataset
Working doc: https://docs.google.com/document/d/1h585bH5sYcQW4pkHzqWyQqA4ape2Bq6o1Cya0TkMOQc/edit?usp=sharing
BigQuery query (see so_bigquery.ipynb):
CREATE TEMP TABLE answers AS
SELECT *
FROM bigquery-public-data.stackoverflow.posts_answers
WHERE LOWER(Body) LIKE '%arxiv%';
CREATE TEMPORARY TABLE questions AS
SELECT *
FROM bigquery-public-data.stackoverflow.posts_questions;
SELECT *
FROM answers
JOIN questions ON questions.id = answers.parent_id;
NOTE: BigQuery only has the StackOverflow site data, not the other sites. So if we want to query the other sites, we would probably want to download the data dump to a cluster and run a SQL server.
Columns in the raw query output:
'id',
'title',
'body',
'accepted_answer_id',
'answer_count',
'comment_count',
'community_owned_date', # present only if post is community wiki'd
'creation_date',
'favorite_count',
'last_activity_date',
'last_edit_date',
'last_editor_display_name',
'last_editor_user_id',
'owner_display_name',
'owner_user_id',
'parent_id', # if post is answer, then this is the question id; if post is question, this is None
'post_type_id', # 1 = QUESTION, 2 = ANSWER
'score',
'tags',
'view_count',
(Official database schema)[https://meta.stackexchange.com/questions/2677/database-schema-documentation-for-the-public-data-dump-and-sede/2678#2678]
File structure
Each folder represents the different StackExchange sites (~182). The largest one is StackOverflow.