Datasets:
|
Download README.md from morenolq/lapsus: direct link, hf CLI and curl.
- Browser
- Download file 4.69 kB
-
https://huggingface.co/datasets/morenolq/lapsus/resolve/main/README.md
- Command line
-
hf download hf://datasets/morenolq/lapsus/README.md
-
curl -L -o README.md https://huggingface.co/datasets/morenolq/lapsus/resolve/main/README.md
4.69 kB
| language: | |
| - en | |
| - it | |
| license: cc-by-2.0 | |
| pretty_name: Lapsus | |
| size_categories: | |
| - 10K<n<100K | |
| task_categories: | |
| - text-classification | |
| - token-classification | |
| tags: | |
| - synthetic | |
| - grammar | |
| - acceptability | |
| configs: | |
| - config_name: en | |
| data_files: | |
| - split: train | |
| path: en/train-* | |
| - split: validation | |
| path: en/validation-* | |
| - split: test | |
| path: en/test-* | |
| - split: test_unseen_lemmas | |
| path: en/test_unseen_lemmas-* | |
| - config_name: it | |
| data_files: | |
| - split: train | |
| path: it/train-* | |
| - split: validation | |
| path: it/validation-* | |
| - split: test | |
| path: it/test-* | |
| - split: test_unseen_lemmas | |
| path: it/test_unseen_lemmas-* | |
| - config_name: both | |
| data_files: | |
| - split: train | |
| path: both/train-* | |
| - split: validation | |
| path: both/validation-* | |
| - split: test | |
| path: both/test-* | |
| - split: test_unseen_lemmas | |
| path: both/test_unseen_lemmas-* | |
| - config_name: parallel | |
| data_files: | |
| - split: train | |
| path: parallel/train-* | |
| - split: validation | |
| path: parallel/validation-* | |
| - split: test | |
| path: parallel/test-* | |
| - split: test_unseen_lemmas | |
| path: parallel/test_unseen_lemmas-* | |
| # Lapsus | |
| Lapsus is a small dataset of grammatical and ungrammatical sentences in English and Italian. It was made for the course **Elaborazione del Linguaggio Naturale** at [Kore University of Enna](https://www.uke.it), for hands-on exercises with BERT-style models. The code that builds it is on [GitHub](https://github.com/MorenoLaQuatra/lapsus). | |
| ## How it works | |
| We take clean sentences from [Tatoeba](https://tatoeba.org) and break some of them on purpose, keeping track of what we broke and where. There are five kinds of errors: | |
| - `word_order`: two nearby words are swapped (*"i never your cut hair"*) | |
| - `missing_word`: a function word is deleted (*"she went the station"*) | |
| - `repeated_word`: a word is doubled (*"he is is tired"*) | |
| - `agreement`: a form no longer agrees (*"the dogs runs"*, *"la ragazzi"*) | |
| - `wrong_function_word`: the wrong preposition or article (*"in"* instead of *"on"*, *"di"* instead of *"da"*) | |
| In every split 50% of the sentences are clean, 30% have one error and 20% have two or three (labelled `multiple`). | |
| Each broken sentence is checked before it is kept: the new word must be a real form, the result must not be another clean sentence, and a small language model must like it less than the original, that is $\log p(\text{clean}) - \log p(\text{corrupted}) \geq \delta$ (average per token). The checks are automatic, so a few mistakes are still in there. | |
| ## Tasks | |
| The same rows support four tasks. For *"the dogs runs fast"*: | |
| | task | column | label | | |
| |---|---|---| | |
| | binary | `binary` | `not_ok` | | |
| | error type | `multiclass` | `agreement` | | |
| | error types (multi-label) | `multilabel` | $[0, 0, 0, 1, 0]$ | | |
| | token tagging | `token_tags` | *runs* is tagged `agreement`, the rest `O` | | |
| The `multilabel` order is `word_order`, `missing_word`, `repeated_word`, `agreement`, `wrong_function_word`. When a word is missing, the token right after the gap gets the tag. | |
| ## Configs and splits | |
| | config | `train` | `validation` | `test` | `test_unseen_lemmas` | | |
| |---|---|---|---|---| | |
| | `en` | 11865 | 1483 | 1483 | 1500 | | |
| | `it` | 12000 | 1500 | 1500 | 1500 | | |
| | `both` | 23865 | 2983 | 2983 | 3000 | | |
| | `parallel` | 120 | 20 | 6 | 4 | | |
| `both` is `en` plus `it` with a `lang` column. `parallel` is a small set of English-Italian translation pairs (`pair_id`). In `test_unseen_lemmas` the content words never appear in the other splits, so it tests generalization rather than memorization. | |
| ```python | |
| from datasets import load_dataset | |
| ds = load_dataset("morenolq/lapsus", "it") | |
| ``` | |
| Other useful columns: `tokens`, `clean_text` (the original sentence), `n_corruptions`, `source_id`, `source_author` and `license`. Text is lowercased and the final punctuation is removed; Italian elisions are split (*l'uomo* becomes *l'* + *uomo*). | |
| ## Licence | |
| The dataset is released as `cc-by-2.0` because it follows its Tatoeba sources: English sentences are CC0 (public domain), Italian sentences are CC BY 2.0 FR. Each row has its own `license` column and every contributor is listed in `ATTRIBUTION.md`. Labels and code are Apache-2.0. | |
| ## Limitations | |
| - The errors are synthetic and cover only five families, not everything learners do. | |
| - Tatoeba sentences are short and conversational. | |
| - Some errors (like repeated words) are easy to spot with shallow features, so try a TF-IDF baseline before claiming a model learned syntax. | |
| ## Citation | |
| ```bibtex | |
| @misc{lapsus, | |
| title = {Lapsus: a bilingual grammatical acceptability dataset for teaching NLP}, | |
| howpublished = {\url{https://github.com/MorenoLaQuatra/lapsus}}, | |
| year = {2026} | |
| } | |
| ``` | |