| --- |
| license: apache-2.0 |
| task_categories: |
| - text-generation |
| language: |
| - en |
| tags: |
| - generics |
| pretty_name: MGen |
| size_categories: |
| - 1M<n<10M |
| --- |
| |
| ## MGen Dataset: Millions of Generics in Context |
|
|
| This repository hosts the MGen dataset: a collection of millions of naturally occuring generics and quantified sentences in context. |
|
|
| 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](https://gustavocilleruelo.com/mgen). |
|
|
| ## Data Structure |
|
|
| The dataset is released in several .csv files. |
|
|
| - `sentences.csv` This is the main file, containing only the generic and quantified sentences with some metadata, as described below. |
|
|
| **Please note that to properly open this csv with `pandas` you need to specify the lineterminator: `mgen = pd.read_csv('data/mgen/sentences.csv', lineterminator='\n')`. Without this, the data will not open up properly!** |
| |
| | Column Name | Description | |
| |-------------|----------------------| |
| | `id` | Unique id of the sentence, `doc_id` + the cardinality of the sentence within that doc. | |
| | `doc_id` | Unique document id (hash of the raw document text, more details below) | |
| | `text` | Target sentence (string). | |
| | `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` | |
| | `source` | Source of the original document. One of `arxiv`, `peS2o`, `slimpajama`, `refinedweb`, `pile-uncopyrighted`. | |
| | `score` | Score of the RoBERTa-based classifier for genericity. Sentences are selected to have greater score than 0.8. | |
| | `n_words` | Number of words in the sentence (counted by splitting whitespaces). | |
| | `quantifier_position` | Quantifier position. Either `first_word` or `middle` if the quantifier is after the bare plural (i.e. tigers are normally striped). | |
| | `quantifier_category` | One of `gen`, `determiner`, `adverbial`. | |
| |
| - Documents with the contexts of the generic/quantified sentences from each of the five sources. |
| |
| | Column Name | Description | |
| |-------------|----------------------| |
| | `doc_id` | Unique document id (hash of the raw document text, more details below) | |
| | `text` | Context text (string). | |
| | `source` | Source of the document. | |
| |
| The `doc_id` is calculated by hashing the raw string of the whole documents from [ZYDA](https://huggingface.co/datasets/Zyphra/Zyda). |
| |
| The following python snippet calculates the hash (`doc_id`) from the `text` of a document: `hashlib.sha1(text).hexdigest()`. |
| |
| Note that this repository does not currently contain the context documents, to download those please see the [blogpost](https://gustavocilleruelo.com/mgen). |
| |
| ## Recommended Usage |
| |
| 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. |
| |
| ## Cite |
| |
| If you use this dataset, please please please cite the paper! Also feel free to contact me for any doubts or additional data! |
| |
| ``` |
| @article{cilleruelo2025mgen, |
| author = {Cilleruelo, G. and Allaway, E. and Haddow, B. and Birch, A.}, |
| title = {MGEN: Millions of Naturally Occurring Generics in Context}, |
| journal = {Society for Computation in Linguistics}, |
| volume = {8}, |
| number = {1}, |
| pages = {10}, |
| year = {2025}, |
| doi = {10.7275/scil.3147} |
| } |
| |
| ``` |
| |
| This work was funded by the European Union’s Horizon Europe (HE) Research and Innovation programme under Grant Agreement No 101070631 and from the UK Research and Innovation (UKRI) under the UK government’s HE funding grant No 10039436. |