glopezas commited on
Commit
d5229a7
·
verified ·
1 Parent(s): 9fdc3ed

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +36 -57
README.md CHANGED
@@ -1,28 +1,27 @@
1
- ```
2
- ---
3
  pretty_name: Math StackExchange Curated (Parquet, CC BY-SA 4.0)
4
  dataset_type: text
5
  license: cc-by-sa-4.0
6
  language:
7
- - en
8
  tags:
9
- - math
10
- - question-answering
11
- - reasoning
12
- - stackexchange
13
- - cc-by-sa
14
- - parquet
15
  task_categories:
16
- - question-answering
17
  task_ids:
18
- - open-domain-qa
19
- - abstractive-qa
 
20
  configs:
21
- - config_name: default
22
- data_files:
23
- train: math_stackexchange_train.parquet
24
- validation: math_stackexchange_val.parquet
25
- test: math_stackexchange_test.parquet
26
  ---
27
 
28
  # Math StackExchange Curated (Parquet, CC BY-SA 4.0)
@@ -47,18 +46,16 @@ This derived dataset is released under CC BY-SA 4.0 in accordance with the licen
47
 
48
  Field | Type | Description
49
  ----- | ----- | -----------
50
- title | string | The title of the original Math StackExchange thread.
51
- question_body | string | Full body of the question, often including LaTeX/MathJax.
52
- answer_body | string | The answer chosen for this dataset (may or may not be accepted).
53
- tags | string | Pipe-delimited set of tags, e.g. `|number-theory|elementary-number-theory|`.
54
- accepted | int64 | `1` if the included answer was the accepted solution, else `0`.
55
 
56
  ---
57
 
58
  ## Example
59
 
60
- ```
61
-
62
  {
63
  "title": "Numbers are too large to show $65^{64}+64^{65}$ is not a prime",
64
  "question_body": "I tried to find cycles of powers ...",
@@ -67,18 +64,8 @@ accepted | int64 | `1` if the included answer was the accepted solution, else `0
67
  "accepted": 0
68
  }
69
 
70
- ```
71
- ```
72
-
73
- {
74
- "title": "Rank-one Matrix (first step in proving the SVD by induction on the rank of A)",
75
- "question_body": "Suppose A has rank 1 ...",
76
- "answer_body": "Since A has rank 1, any two columns are linearly dependent ...",
77
- "tags": "|matrices|numerical-linear-algebra|",
78
- "accepted": 0
79
- }
80
-
81
- ```
82
 
83
  ---
84
 
@@ -86,50 +73,43 @@ accepted | int64 | `1` if the included answer was the accepted solution, else `0
86
 
87
  ### Using Hugging Face datasets
88
 
89
- ```
90
-
91
  from datasets import load_dataset
92
  ds = load_dataset("<username>/<dataset_name>")
93
  print(ds["train"][0])
94
 
95
- ```
 
96
 
97
  ### Loading Parquet directly
98
 
99
- ```
100
-
101
  from datasets import Dataset
102
  train = Dataset.from_parquet("math_stackexchange_train.parquet")
103
- val = Dataset.from_parquet("math_stackexchange_val.parquet")
104
- test = Dataset.from_parquet("math_stackexchange_test.parquet")
105
 
106
- ```
 
107
 
108
  ---
109
 
110
- ## Tag normalization
111
-
112
- ```
113
 
114
  def split_tags(s):
115
  if not s:
116
  return []
117
  return [t for t in s.strip("|").split("|") if t]
118
 
119
- example = ds["train"][0]
120
- tags = split_tags(example["tags"])
121
- print(tags)
122
-
123
- ```
124
 
125
  ---
126
 
127
  ## License & Attribution
128
 
129
  License: CC BY-SA 4.0
130
- Attribution is required:
131
- "This dataset includes content derived from the Math StackExchange public data dump (CC BY-SA 4.0, © Stack Exchange Inc.)."
132
- Share-alike applies: derivatives must also be released under CC BY-SA 4.0.
133
 
134
  Full license: https://creativecommons.org/licenses/by-sa/4.0/
135
 
@@ -137,5 +117,4 @@ Full license: https://creativecommons.org/licenses/by-sa/4.0/
137
 
138
  ## Changelog
139
 
140
- v1.0 — Initial release (train/val/test in Parquet).
141
- ```
 
 
 
1
  pretty_name: Math StackExchange Curated (Parquet, CC BY-SA 4.0)
2
  dataset_type: text
3
  license: cc-by-sa-4.0
4
  language:
5
+ - en
6
  tags:
7
+ - math
8
+ - question-answering
9
+ - reasoning
10
+ - stackexchange
11
+ - cc-by-sa
12
+ - parquet
13
  task_categories:
14
+ - question-answering
15
  task_ids:
16
+ - open-domain-qa
17
+ - abstractive-qa
18
+
19
  configs:
20
+ - config_name: default
21
+ data_files:
22
+ train: math_stackexchange_train.parquet
23
+ validation: math_stackexchange_val.parquet
24
+ test: math_stackexchange_test.parquet
25
  ---
26
 
27
  # Math StackExchange Curated (Parquet, CC BY-SA 4.0)
 
46
 
47
  Field | Type | Description
48
  ----- | ----- | -----------
49
+ title | string | Title of the Math StackExchange question.
50
+ question_body | string | Full body of the question (often contains LaTeX/MathJax).
51
+ answer_body | string | The selected answer included in this dataset.
52
+ tags | string | Pipe-delimited tag string, e.g. `|number-theory|algebra|`.
53
+ accepted | int64 | `1` if the answer was accepted; `0` otherwise.
54
 
55
  ---
56
 
57
  ## Example
58
 
 
 
59
  {
60
  "title": "Numbers are too large to show $65^{64}+64^{65}$ is not a prime",
61
  "question_body": "I tried to find cycles of powers ...",
 
64
  "accepted": 0
65
  }
66
 
67
+ yaml
68
+ Copy code
 
 
 
 
 
 
 
 
 
 
69
 
70
  ---
71
 
 
73
 
74
  ### Using Hugging Face datasets
75
 
 
 
76
  from datasets import load_dataset
77
  ds = load_dataset("<username>/<dataset_name>")
78
  print(ds["train"][0])
79
 
80
+ shell
81
+ Copy code
82
 
83
  ### Loading Parquet directly
84
 
 
 
85
  from datasets import Dataset
86
  train = Dataset.from_parquet("math_stackexchange_train.parquet")
87
+ val = Dataset.from_parquet("math_stackexchange_val.parquet")
88
+ test = Dataset.from_parquet("math_stackexchange_test.parquet")
89
 
90
+ yaml
91
+ Copy code
92
 
93
  ---
94
 
95
+ ## Convert tags to list
 
 
96
 
97
  def split_tags(s):
98
  if not s:
99
  return []
100
  return [t for t in s.strip("|").split("|") if t]
101
 
102
+ yaml
103
+ Copy code
 
 
 
104
 
105
  ---
106
 
107
  ## License & Attribution
108
 
109
  License: CC BY-SA 4.0
110
+
111
+ Required attribution:
112
+ "This dataset includes content derived from the Math StackExchange public data dump (CC BY-SA 4.0, © Stack Exchange Inc.)."
113
 
114
  Full license: https://creativecommons.org/licenses/by-sa/4.0/
115
 
 
117
 
118
  ## Changelog
119
 
120
+ v1.0 — Initial release (Parquet train/val/test)