Datasets:
Update README.md
Browse files
README.md
CHANGED
@@ -9,45 +9,52 @@ task_categories:
|
|
9 |
- text2text-generation
|
10 |
tags:
|
11 |
- code
|
12 |
-
pretty_name: StackOverflow Posts
|
13 |
size_categories:
|
14 |
- 10M<n<100M
|
15 |
---
|
16 |
|
17 |
-
#
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
This dataset contains all posts submitted to StackOverflow before the 14th of June 2023 formatted as **Markdown text**.<br>
|
20 |
The dataset contains over 60 Million posts, totaling ~40GB in size and ~65 billion characters of text.<br>
|
21 |
The data is sourced from [Internet Archive StackExchange Data Dump](https://archive.org/download/stackexchange).
|
22 |
|
23 |
-
|
24 |
-
```
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
|
|
41 |
```
|
42 |
|
43 |
-
|
44 |
|
45 |
The original Data Dump formats the "Body" field as html, using tags such as `<code>`, `<h1>`, `<ul>`, etc.
|
46 |
This HTML format has been converted to markdown
|
47 |
|
48 |
[This post](https://stackoverflow.com/questions/53253940/make-react-useeffect-hook-not-run-on-initial-render) is contained in the dataset formatted as follows:
|
49 |
|
50 |
-
|
51 |
```markdown
|
52 |
According to the docs:
|
53 |
|
@@ -82,7 +89,7 @@ function ComponentDidUpdateFunction() {
|
|
82 |
|
83 |
```
|
84 |
|
85 |
-
|
86 |
|
87 |
Using Jsoup, the original Body field was converted into a Jsoup Document. This child **nodes** (has special meaning in context of Jsoup) of this document were recursively traversed in a depth-first order.
|
88 |
|
@@ -96,7 +103,7 @@ Additionally the existence of the `TextNode` should be noted, which represents f
|
|
96 |
Thus this text tag `<p>Hello<code>World</code></p>` would have two Jsoup child nodes `TextNode(value="Hello")` and Element(tag="code", value="World")`.
|
97 |
The value `field` of a `TextNode` contains the free standing text without any further treatment (no whitespace stripping, etc.)
|
98 |
|
99 |
-
|
100 |
|
101 |
- When ecountering a html tag for which a rule exists, children are not further traversed, **unless explicitly stated otherwise**.
|
102 |
- When encountering an `<a>` tag, `[${element.text()}](${element.attr("href")})` is emitted.
|
@@ -131,5 +138,4 @@ The value `field` of a `TextNode` contains the free standing text without any fu
|
|
131 |
- When encountering a jsoup `TextNode`, `${node.attr(node.nodeName())}` (which is equivalent to accessing the private field `node.value`) is emitted.
|
132 |
|
133 |
|
134 |
-
```
|
135 |
-
|
|
|
9 |
- text2text-generation
|
10 |
tags:
|
11 |
- code
|
12 |
+
pretty_name: StackOverflow Posts Markdown
|
13 |
size_categories:
|
14 |
- 10M<n<100M
|
15 |
---
|
16 |
|
17 |
+
# StackOverflow Posts Markdown
|
18 |
+
|
19 |
+
![StackOverflow Logo](https://stackoverflow.design/assets/img/logos/so/logo-stackoverflow.png)
|
20 |
+
|
21 |
+
|
22 |
+
## Dataset Summary
|
23 |
|
24 |
This dataset contains all posts submitted to StackOverflow before the 14th of June 2023 formatted as **Markdown text**.<br>
|
25 |
The dataset contains over 60 Million posts, totaling ~40GB in size and ~65 billion characters of text.<br>
|
26 |
The data is sourced from [Internet Archive StackExchange Data Dump](https://archive.org/download/stackexchange).
|
27 |
|
28 |
+
## Data Fields
|
29 |
+
```typescript
|
30 |
+
{
|
31 |
+
Id: long,
|
32 |
+
PostTypeId: long
|
33 |
+
AcceptedAnswerId: long | null,
|
34 |
+
ParentId: long | null,
|
35 |
+
Score: long,
|
36 |
+
ViewCount: long | null,
|
37 |
+
Body: string | null,
|
38 |
+
Title: string | null
|
39 |
+
ContentLicense: string | null,
|
40 |
+
FavoriteCount: long | null,
|
41 |
+
CreationDate: string | null,
|
42 |
+
LastActivityDate: string | null,
|
43 |
+
LastEditDate: string | null,
|
44 |
+
LastEditorUserId: long | null,
|
45 |
+
OwnerUserId: long | null
|
46 |
+
Tags: array<string> | null
|
47 |
+
}
|
48 |
```
|
49 |
|
50 |
+
## How is the text stored?
|
51 |
|
52 |
The original Data Dump formats the "Body" field as html, using tags such as `<code>`, `<h1>`, `<ul>`, etc.
|
53 |
This HTML format has been converted to markdown
|
54 |
|
55 |
[This post](https://stackoverflow.com/questions/53253940/make-react-useeffect-hook-not-run-on-initial-render) is contained in the dataset formatted as follows:
|
56 |
|
57 |
+
### Body of an example record
|
58 |
```markdown
|
59 |
According to the docs:
|
60 |
|
|
|
89 |
|
90 |
```
|
91 |
|
92 |
+
## Details on the HTML to Markdown conversion
|
93 |
|
94 |
Using Jsoup, the original Body field was converted into a Jsoup Document. This child **nodes** (has special meaning in context of Jsoup) of this document were recursively traversed in a depth-first order.
|
95 |
|
|
|
103 |
Thus this text tag `<p>Hello<code>World</code></p>` would have two Jsoup child nodes `TextNode(value="Hello")` and Element(tag="code", value="World")`.
|
104 |
The value `field` of a `TextNode` contains the free standing text without any further treatment (no whitespace stripping, etc.)
|
105 |
|
106 |
+
#### Traversing Rules
|
107 |
|
108 |
- When ecountering a html tag for which a rule exists, children are not further traversed, **unless explicitly stated otherwise**.
|
109 |
- When encountering an `<a>` tag, `[${element.text()}](${element.attr("href")})` is emitted.
|
|
|
138 |
- When encountering a jsoup `TextNode`, `${node.attr(node.nodeName())}` (which is equivalent to accessing the private field `node.value`) is emitted.
|
139 |
|
140 |
|
141 |
+
```
|
|