Update README.md
Browse files
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 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 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 |
|
| 51 |
-
question_body | string | Full body of the question
|
| 52 |
-
answer_body | string | The answer
|
| 53 |
-
tags | string | Pipe-delimited
|
| 54 |
-
accepted | int64 | `1` if the
|
| 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
|
| 104 |
-
test
|
| 105 |
|
| 106 |
-
|
|
|
|
| 107 |
|
| 108 |
---
|
| 109 |
|
| 110 |
-
##
|
| 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 |
-
|
| 120 |
-
|
| 121 |
-
print(tags)
|
| 122 |
-
|
| 123 |
-
```
|
| 124 |
|
| 125 |
---
|
| 126 |
|
| 127 |
## License & Attribution
|
| 128 |
|
| 129 |
License: CC BY-SA 4.0
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 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
|
| 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)
|
|
|