ilyocoris commited on
Commit
1f28d4d
·
verified ·
1 Parent(s): a03433c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +41 -1
README.md CHANGED
@@ -9,4 +9,44 @@ tags:
9
  pretty_name: MGen
10
  size_categories:
11
  - 1M<n<10M
12
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  pretty_name: MGen
10
  size_categories:
11
  - 1M<n<10M
12
+ ---
13
+
14
+ ## MGen Dataset: Millions of Generics in Context
15
+
16
+ This repository hosts the MGen dataset: a collection of millions of naturally occuring generics and quantified sentences in context.
17
+
18
+ This dataset is designed to be a resource for the empirical study of generic sentences. Find the details of the construction in the [SCiL 2025 paper]() or the [blogpost](gustavocilleruelo.com/mgen).
19
+
20
+ ## Data Structure
21
+
22
+ The dataset is released in several files.
23
+
24
+ - `sentences.csv` This is the main file, containing only the generic and quantified sentences with some metadata, as described below.
25
+
26
+ | Column Name | Description |
27
+ |-------------|----------------------|
28
+ | `id` | Unique id of the sentence, `doc_id` + the cardinality of the sentence within that doc. |
29
+ | `doc_id` | Unique document id (hash of the raw document text, more details below) |
30
+ | `text` | Target sentence (string). |
31
+ | `quantifier` | Qunatifier that appears in the main clause of the sentence, one of: `gen`, `all`, `most`, `many`, `some`, `few`, `no`, `often`, `generally`, `typically`, `usually`, `normally` |
32
+ | `source` | Source of the original document. One of `arxiv`, `peS2o`, `slimpajama`, `refinedweb`, `pile-uncopyrighted`. |
33
+ | `score` | Score of the RoBERTa-based classifier for genericity. Sentences are selected to have greater score than 0.8. |
34
+ | `n_words` | Number of words in the sentence (counted by splitting whitespaces). |
35
+ | `quantifier_position` | Quantifier position. Either `first_word` or `middle` if the quantifier is after the bare plural (i.e. tigers are normally striped). |
36
+ | `quantifier_category` | One of `gen`, `determiner`, `adverbial`. |
37
+
38
+ - In `documents/` we find the .csv for the documents from each of the five sources.
39
+
40
+ | Column Name | Description |
41
+ |-------------|----------------------|
42
+ | `doc_id` | Unique document id (hash of the raw document text, more details below) |
43
+ | `text` | Context text (string). |
44
+ | `source` | Source of the document. |
45
+
46
+ The `doc_id` is calculated by hashing the raw string of the whole documents from (ZYDA)[https://huggingface.co/datasets/Zyphra/Zyda].
47
+
48
+ The following python snippet calculates the hash (`doc_id`) from the `text` of a document: `hashlib.sha1(text).hexdigest()`.
49
+
50
+ ## Recommended Usage
51
+
52
+ It is recommended to sample first from `sentences.csv`, finding those sentences of interest (because of topic, quantifier or other reasons), and then find the contexts of this subset. Because the contexts are long, often corresponding to websites or research papers, the documents .csv are very heavy and slow to work with.