mikex86 commited on
Commit
7e1d1fd
1 Parent(s): 1a4e37f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +14 -0
README.md CHANGED
@@ -47,6 +47,20 @@ The data is sourced from [Internet Archive StackExchange Data Dump](https://arch
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.
 
47
  }
48
  ```
49
 
50
+ ## How to use?
51
+
52
+ ```python
53
+ from datasets import load_dataset
54
+
55
+ # predownload full dataset
56
+ ds = load_dataset('mikex86/stackoverflow-posts', split='train')
57
+
58
+ # dataset streaming (will only download the data as needed)
59
+ ds = load_dataset('mikex86/stackoverflow-posts', split='train', streaming=True)
60
+
61
+ for sample in iter(ds): print(sample["Body"])
62
+ ```
63
+
64
  ## How is the text stored?
65
 
66
  The original Data Dump formats the "Body" field as html, using tags such as `<code>`, `<h1>`, `<ul>`, etc.