kernelmachine commited on
Commit
384d5e1
1 Parent(s): 47f7c92

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -3
README.md CHANGED
@@ -55,11 +55,20 @@ OLC is primarily an English-language dataset, but also contains some data in oth
55
 
56
  ## Dataset Structure
57
 
58
- The dataset is a standard text-only structure, separated into each subset that we include in the paper. To use a subset of sources, you should specify each individually, like so:
59
 
60
  ```
61
- import datasets
62
- dataset = datasets.load_dataset('open-license-corpus', ['pd_law', 'sw_github'], streaming=True)
 
 
 
 
 
 
 
 
 
63
  ```
64
 
65
  ### Data Instances and Fields
 
55
 
56
  ## Dataset Structure
57
 
58
+ The dataset is a standard text-only structure, separated into each subset that we include in the paper.
59
 
60
  ```
61
+ from datasets import load_dataset
62
+ dataset = load_dataset('kernelmachine/open-license-corpus', 'pd_law', streaming=True)['train']
63
+ ```
64
+
65
+ To use a collection of sources, you should specify each individually and interleave, like so:
66
+
67
+ ```
68
+ from datasets import interleave_datasets, load_dataset
69
+ d1 = load_dataset('kernelmachine/open-license-corpus', 'pd_law', streaming=True)['train']
70
+ d2 = load_dataset('kernelmachine/open-license-corpus', 'sw_github', streaming=True)['train']
71
+ d1_d2 = interleave_datasets([d1,d2], probabilities=[0.8, 0.2], seed=42)
72
  ```
73
 
74
  ### Data Instances and Fields