|
Download README.md from Tarnyd/sv-blimp: direct link, hf CLI and curl.
- Browser
- Download file 15.2 kB
-
https://huggingface.co/datasets/Tarnyd/sv-blimp/resolve/main/README.md
- Command line
-
hf download hf://datasets/Tarnyd/sv-blimp/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Tarnyd/sv-blimp/resolve/main/README.md
15.2 kB
| pretty_name: Sv-BLiMP | |
| language: | |
| - sv | |
| license: mit | |
| tags: | |
| - swedish | |
| - grammar | |
| - syntax | |
| - minimal-pairs | |
| - acceptability | |
| - linguistic-benchmark | |
| size_categories: | |
| - 10K<n<100K | |
| task_categories: | |
| - other | |
| configs: | |
| - config_name: anaphor_agreement | |
| data_files: | |
| - split: train | |
| path: anaphor_agreement/train-00000-of-00001.parquet | |
| - config_name: argument_structure | |
| data_files: | |
| - split: train | |
| path: argument_structure/train-00000-of-00001.parquet | |
| - config_name: binding | |
| data_files: | |
| - split: train | |
| path: binding/train-00000-of-00001.parquet | |
| - config_name: determiners | |
| data_files: | |
| - split: train | |
| path: determiners/train-00000-of-00001.parquet | |
| - config_name: ellipsis | |
| data_files: | |
| - split: train | |
| path: ellipsis/train-00000-of-00001.parquet | |
| - config_name: gender_agreement | |
| data_files: | |
| - split: train | |
| path: gender_agreement/train-00000-of-00001.parquet | |
| - config_name: irregular_forms | |
| data_files: | |
| - split: train | |
| path: irregular_forms/train-00000-of-00001.parquet | |
| - config_name: island_effects | |
| data_files: | |
| - split: train | |
| path: island_effects/train-00000-of-00001.parquet | |
| - config_name: nominalization | |
| data_files: | |
| - split: train | |
| path: nominalization/train-00000-of-00001.parquet | |
| - config_name: npi_licensing | |
| data_files: | |
| - split: train | |
| path: npi_licensing/train-00000-of-00001.parquet | |
| - config_name: particle_verbs | |
| data_files: | |
| - split: train | |
| path: particle_verbs/train-00000-of-00001.parquet | |
| - config_name: passives | |
| data_files: | |
| - split: train | |
| path: passives/train-00000-of-00001.parquet | |
| - config_name: quantifiers | |
| data_files: | |
| - split: train | |
| path: quantifiers/train-00000-of-00001.parquet | |
| - config_name: relative_clauses | |
| data_files: | |
| - split: train | |
| path: relative_clauses/train-00000-of-00001.parquet | |
| - config_name: subordinate_word_order | |
| data_files: | |
| - split: train | |
| path: subordinate_word_order/train-00000-of-00001.parquet | |
| - config_name: v2_violation | |
| data_files: | |
| - split: train | |
| path: v2_violation/train-00000-of-00001.parquet | |
| # Sv-BLiMP — Swedish Benchmark of Linguistic Minimal Pairs | |
| A large-scale benchmark of **16,000 minimal pairs** (16 linguistic categories × 1,000 pairs) for evaluating Swedish language models. Inspired by [TurBLiMP](https://huggingface.co/datasets/juletxara/turblimp), it tests whether a model can distinguish grammatical and semantically plausible Swedish sentences from minimally altered ungrammatical ones. | |
| ## Dataset structure | |
| | File | Category | | |
| |---|---| | |
| | `sv_blimp_subordinate_word_order.jsonl` | Adverb placement in subordinate clauses (V-final) | | |
| | `sv_blimp_v2_violation.jsonl` | V2 word order violations in main clauses | | |
| | `sv_blimp_particle_verbs.jsonl` | Separable verb-particle order | | |
| | `sv_blimp_gender_agreement.jsonl` | Adjective–noun gender agreement (common vs. neuter) | | |
| | `sv_blimp_determiners.jsonl` | Definite vs. indefinite noun form | | |
| | `sv_blimp_anaphor_agreement.jsonl` | Reflexive *sig* vs. 3rd-person pronoun | | |
| | `sv_blimp_argument_structure.jsonl` | Missing obligatory preposition (verb + P vs. bare verb) | | |
| | `sv_blimp_binding.jsonl` | Anaphor binding (Principle A/B): reflexive object (*sig själv* vs. *honom/henne*), embedded-clause subject (*han* vs. *sig själv*), possessive reflexive (*sin/sitt* vs. *hans/hennes*) | | |
| | `sv_blimp_ellipsis.jsonl` | Coordinate ellipsis vs. ungrammatical repetition | | |
| | `sv_blimp_irregular_forms.jsonl` | Irregular preterite forms vs. fake regularized forms | | |
| | `sv_blimp_island_effects.jsonl` | Complex-NP islands: natural wh-questions with the wh-trace inside a relative clause | | |
| | `sv_blimp_nominalization.jsonl` | Nominal agreement (*beslutet var viktigt* vs. *viktig*) | | |
| | `sv_blimp_npi_licensing.jsonl` | Negative polarity item licensing (*inte … någon* vs. *… ingen*) | | |
| | `sv_blimp_passives.jsonl` | Passive vs. active forms on inanimate subjects | | |
| | `sv_blimp_quantifiers.jsonl` | *många* (count) vs. *mycket* (mass) quantifier selection | | |
| | `sv_blimp_relative_clauses.jsonl` | Cleft with *som* vs. ungrammatical *vilken* | | |
| ## Filernas syfte / Purpose of each file | |
| Varje fil dokumenteras med en svensk titel, en engelsk titel (identisk med kategorin i filnamnet) och en beskrivning på båda språkun. Each file is documented with a Swedish title, an English title (identical to the category in the file name), and a description in both languages. | |
| ### 1. Bisatsordning / `subordinate_word_order` | |
| - **SV:** Ordningen i *att*-bisatser: verbet måste stå sist i bisatsen (V-till-sist). Den felaktiga meningen har huvudmeningsordning med objekt före verb inuti bisatsen, t.ex. "…att chefen telefonen inte köper" istället för "…att chefen inte köper telefonen". | |
| - **EN:** Word order in *att*-subordinate clauses: the verb must be final (V-to-end). The bad sentence uses main-clause word order with the object before the verb inside the subordinate clause. | |
| ### 2. V2-ordning / `v2_violation` | |
| - **SV:** I huvudsatser i svenskan står det finita verbet på andra plats (V2-regeln). Den felaktiga meningen bryter mot regeln, t.ex. "I går mamman såg väskan" istället för "I går såg mamman väskan". | |
| - **EN:** In Swedish main clauses the finite verb occupies second position (the V2 rule). The bad sentence violates this rule. | |
| ### 3. Partikelverb / `particle_verbs` | |
| - **SV:** Separerbarta partikelverb: i huvudsatsen ska partikeln stå före objektet, t.ex. "tar av hatten", inte "tar hatten av". Den felaktiga meningen har partikeln sist. | |
| - **EN:** Separable verb particles: in a main clause the particle precedes the object ("tar av hatten"), not follows it ("*tar hatten av"). | |
| ### 4. Genuskongruens / `gender_agreement` | |
| - **SV:** Adjektivets form måste följa substantivets genus: common (*en*) vs. neutrum (*ett*), t.ex. "en stor hund" / "ett stort hus". Den felaktiga meningen använder adjektivformen för fel genus. | |
| - **EN:** Adjective forms must agree with noun gender: common (*en*) vs. neuter (*ett*), e.g. "en stor hund" / "ett stort hus". The bad sentence uses the adjective form of the wrong gender. | |
| ### 5. Artikelanvändning / `determiners` | |
| - **SV:** Definit artikel kräver definit substantivform: "den snälla hunden", inte "den snäll hund". Den felaktiga meningen har definit artikel med indefinit substantiv. | |
| - **EN:** The definite article requires the definite noun form ("den snälla hunden"), not an indefinite one ("*den snäll hund"). | |
| ### 6. Reflexivt pronomen / `anaphor_agreement` | |
| - **SV:** Reflexiva verb kräver pronomenet *sig* oavsett person och genus: "pojken klär sig", inte "pojken klär honom". Den felaktiga meningen använder ett 3-personspronomen (*honom/henne/dem/den*) istället för *sig*. | |
| - **EN:** Reflexive verbs require the reflexive pronoun *sig* regardless of person and gender ("pojken klär sig"), not a 3rd-person pronoun ("*pojken klär honom*). | |
| ### 7. Argumentstruktur / `argument_structure` | |
| - **SV:** Vissa verb kräver en preposition för sitt objekt: "vänta på bussen", inte "vänta bussen". Den felaktiga meningen saknar den obligatoriska prepositionen. | |
| - **EN:** Some verbs require a preposition for their object ("vänta på bussen"), not a bare object ("*vänta bussen"). The bad sentence is missing the obligatory preposition. | |
| ### 8. Anaforsbindning / `binding` | |
| - **SV:** Tre konfigurationer av bindningsteorin (Princip A/B): (A) reflexivt objekt i huvudsatsen — "Johan ser sig själv", inte "Johan ser honom"; (B) ett reflexivt pronomen kan aldrig vara subjekt — "Johan sa att han var trött", inte "…att sig själv var trött"; (C) possessivt reflexivum — "Kalle tvättade sin bil", inte "Kalle tvättade hans bil". | |
| - **EN:** Three configurations of binding theory (Principle A/B): (A) reflexive object in the matrix clause ("Johan ser sig själv" vs. "*…honom"); (B) a reflexive can never be a subject ("…att han var trött" vs. "*…att sig själv var trött"); (C) possessive reflexive ("Kalle tvättade sin bil" vs. "*…hans bil"). | |
| ### 9. Koordinationsellips / `ellipsis` | |
| - **SV:** I koordinering kan andrasatsens verb och objekt utelämnas: "Johan köpte bilen och Maria boken". Den felaktiga meningen upprepar dem i stället i en ogrammatisk ordning ("…och Maria bilen köpte"). | |
| - **EN:** Coordinate ellipsis: the second conjunct may omit the verb and object ("Johan köpte bilen och Maria boken"). The bad sentence repeats them in ungrammatical order. | |
| ### 10. Oregelbundna verbformer / `irregular_forms` | |
| - **SV:** Svenska oregelbundna preteriter, t.ex. "sjöng", "drack", "sprang". Den felaktiga meningen använder en falsk regulariserad form ("sjungade", "drickade"). | |
| - **EN:** Irregular Swedish preterites ("sjöng", "drack", "sprang") vs. fake regularized forms in the bad sentence ("*sjungade", "*drickade"). | |
| ### 11. Önseffekter / `island_effects` | |
| - **SV:** Komplexa-NP-ön testad med naturliga wh-frågor. Den korrekta meningen är en vanlig wh-fråga ("Vem ringde hon?" / "Vilken bok gav du?"); den felaktiga har wh-ordets spår inuti en relativ bisats ("*Vem ringde hon studenten som mötte?"), vilket bryter mot extraktionsförbudet för komplexa NP. | |
| - **EN:** Complex-NP islands tested with natural wh-questions. The good sentence is a plain wh-question ("Vem ringde hon?" / "Vilken bok gav du?"); the bad sentence has the wh-trace inside a relative clause ("*Vem ringde hon studenten som mötte?"), violating the extraction ban on complex NPs. | |
| ### 12. Nominalisering / `nominalization` | |
| - **SV:** Nominaliseringar kräver substantivform med korrekt adjektivkongruens: "ombyggnaden av lägenheten tog för lång tid". Den felaktiga meningen ersätter nominaliseringen med en infinitiv ("*ombygga av lägenheten…"). | |
| - **EN:** Nominalizations require the nominal form with correct adjective agreement; the bad sentence replaces the nominalization with a bare infinitive. | |
| ### 13. NPI-licensiering / `npi_licensing` | |
| - **SV:** Negativa polaritetselement kräver en licensierande negation: "Jag har inte köpt någon bil" är korrekt, medan "Jag har köpt ingen bil" saknar licensiären i denna konstruktion. | |
| - **EN:** Negative polarity items require a licensing negation: "Jag har inte köpt någon bil" is grammatical, while "*Jag har köpt ingen bil*" lacks the licensor in this construction. | |
| ### 14. Passivum / `passives` | |
| - **SV:** Inanimata subjekten kräver passivform: "huset byggs av entreprenören", inte "huset bygger av entreprenören". Den felaktiga meningen använder aktiv form med inanimat subjekt. | |
| - **EN:** Inanimate subjects require the passive ("huset byggs av entreprenören"), not the active form ("*huset bygger …"). | |
| ### 15. Kvantor / `quantifiers` | |
| - **SV:** Kvantorns val beror på substantivets typ: *många* med räknbara pluraler ("många bilar"), *mycket* med massord ("mycket vatten"). Den felaktiga meningen byter kvantor. | |
| - **EN:** Quantifier selection depends on noun type: *många* with count plurals ("många bilar"), *mycket* with mass nouns ("mycket vatten"). The bad sentence swaps the quantifier. | |
| ### 16. Relativa bisatser / `relative_clauses` | |
| - **SV:** I cleft-satser (*Det är X som …*) är relativpronomenet *som* obligatoriskt; *vilken* är inte grammatisk i denna konstruktion: "Det är huset som de såg", inte "*Det är huset vilken de såg". | |
| - **EN:** In cleft sentences (*Det är X som …*) the relative pronoun must be *som*; *vilken* is ungrammatical in this construction. | |
| ## Format | |
| Each line is a JSON object: | |
| ```json | |
| { | |
| "sentence_good": "I går såg mamman väskan.", | |
| "sentence_bad": "I går mamman såg väskan.", | |
| "linguistic_phenomenon": "v2_violation", | |
| "good_cue": "såg mamman", | |
| "bad_cue": "mamman såg", | |
| "critical_region": "såg mamman / mamman såg", | |
| "item_id": 1 | |
| } | |
| ``` | |
| - `sentence_good` — grammatically correct **and** semantically plausible. | |
| - `sentence_bad` — minimally altered, ungrammatical variant. | |
| - `good_cue` / `bad_cue` — the critical token(s) in each sentence. | |
| - `critical_region` — both cues joined for convenience. | |
| - `item_id` — 1–1000 within each category file. | |
| All files are UTF-8, one JSON object per line (`ensure_ascii=False`). | |
| ## Generation methodology | |
| Data is generated deterministically from **semantic frames** by `generate_sv_blimp.py`: | |
| 1. **Semantic compatibility.** Every verb is paired only with semantically compatible objects via explicit per-verb object lists (e.g., *läser* → boken/brevet/tidningen; *jagar* → animals). Animal agents are restricted to animal-compatible verbs, so no dogs read books or birds buy laptops. | |
| 2. **Explicit morphology.** Irregular forms are stored explicitly in the data rather than derived by string manipulation: | |
| - `ADJ_F` = (base, neuter, definite-a, noun_indef, noun_def, gender) handles *vit→vitt*, *liten→lilla*, gemination (*man→mannen*). | |
| - `PASS_F` = explicit passive/active pairs (*byggs* ↔ *bygger*). | |
| 3. **Tense discipline.** Past-time adverbs (*I går*, *Förra veckan*, …) force the preterite; present/neutral adverbs take the present tense — so no "I går köper …" errors. | |
| 4. **Diversity.** Agents, verbs, objects and adverbs are drawn from large pools with seeded random sampling (`random.seed(20261029)`), giving scattered + cluster coverage across categories to expose model drift. | |
| 5. **Uniqueness guarantee.** The generator's `Builder` deduplicates on (good, bad) pairs and hard-fails if a category cannot reach 1,000 unique items; per-category pool design additionally guarantees that every `sentence_good` *and* every `sentence_bad` is unique in its file (verified at 100 % by `audit_all.py`). | |
| ## Validation | |
| - `validate_dataset.py` — structural checks (1,000 items per file, item_id 1–1000, capitalization, terminal punctuation), pair *and* per-sentence uniqueness, a regression list of morphologically corrupted tokens, a tense-consistency check for `v2_violation` (a past-time adverb must be followed by the preterite), and a unique-skeleton enumeration per category for manual review. Exit code 0 = pass. | |
| - `spot_check.py` — regression scan for known defect classes (tense mismatches, semantic incompatibilities, morphological corruption) across all 16,000 `sentence_good` sentences, plus random samples per category for manual review. | |
| Both currently report **zero errors / zero bad-pattern hits**. | |
| ## Intended use | |
| Use as an accept/reject benchmark: a Swedish LLM should assign higher probability (or higher acceptability rating) to `sentence_good` than to `sentence_bad`. Per-category scores reveal which grammatical phenomena the model fails to acquire. Because every good sentence is semantically plausible, low scores cannot be explained away by semantic oddness — only by genuine grammatical failure. | |
| ## Reproducibility | |
| ```bash | |
| python generate_sv_blimp.py # regenerates all 16 .jsonl files | |
| python validate_dataset.py # full validation (exit 0 = pass) | |
| python spot_check.py # defect-class regression scan + random samples | |
| ``` | |