morphbench-de / README.md
yuanxin112's picture
README: point verb_cloze config to verb_cloze/ subfolder
9f10ff3 verified
|
Raw
History Blame Contribute Delete
12.5 kB
---
pretty_name: MorphBench (German)
language:
- de
license: cc-by-sa-4.0
tags:
- morphology
- tokenization
- evaluation
- german
dataset_info:
- config_name: task1_inflection
features:
- name: lemma
dtype: string
- name: feats
dtype: string
- name: target
dtype: string
- name: status
dtype: string
splits:
- name: train
num_bytes: 835801
num_examples: 11982
- name: dev
num_bytes: 69889
num_examples: 995
- name: test
num_bytes: 138820
num_examples: 1989
- name: test_rare
num_bytes: 36938
num_examples: 499
- name: test_memorization
num_bytes: 32659
num_examples: 498
download_size: 393231
dataset_size: 1114107
- config_name: task2_deriv_segmentation
features:
- name: word
dtype: string
- name: segmentation
dtype: string
- name: status
dtype: string
splits:
- name: train
num_bytes: 583722
num_examples: 10000
- name: dev
num_bytes: 59481
num_examples: 1000
- name: test_main
num_bytes: 118920
num_examples: 1966
- name: test_memorization
num_bytes: 28135
num_examples: 500
- name: test_oov
num_bytes: 31843
num_examples: 500
download_size: 348072
dataset_size: 822101
- config_name: task3_derivation
features:
- name: base
dtype: string
- name: affix
dtype: string
- name: target
dtype: string
- name: status
dtype: string
splits:
- name: train
num_bytes: 610293
num_examples: 9935
- name: dev
num_bytes: 62389
num_examples: 998
- name: test_main
num_bytes: 126360
num_examples: 1992
- name: test_memorization
num_bytes: 29265
num_examples: 494
- name: test_oov
num_bytes: 33410
num_examples: 500
download_size: 331468
dataset_size: 861717
- config_name: task4_compound
features:
- name: word
dtype: string
- name: segmentation
dtype: string
- name: difficulty
dtype: string
- name: source
dtype: string
splits:
- name: train
num_bytes: 573352
num_examples: 9982
- name: dev
num_bytes: 57319
num_examples: 997
- name: test_main
num_bytes: 109111
num_examples: 2000
- name: test_rare
num_bytes: 6426
num_examples: 117
- name: test_memorization
num_bytes: 30049
num_examples: 499
- name: test_hardest
num_bytes: 30053
num_examples: 495
download_size: 437099
dataset_size: 806310
- config_name: task5_affix_function
features:
- name: word
dtype: string
- name: function
dtype: string
- name: freq
dtype: int64
- name: status
dtype: string
splits:
- name: train
num_bytes: 345423
num_examples: 5462
- name: dev
num_bytes: 47312
num_examples: 747
- name: test
num_bytes: 98358
num_examples: 1552
download_size: 108713
dataset_size: 491093
- config_name: task6a_definition
features:
- name: word
dtype: string
- name: gloss
dtype: string
- name: base
dtype: string
- name: affix
dtype: string
- name: function
dtype: string
- name: derived_freq
dtype: int64
- name: base_exposure
dtype: int64
- name: status
dtype: string
splits:
- name: train
num_bytes: 1243576
num_examples: 9131
- name: dev
num_bytes: 165878
num_examples: 1251
- name: test_main
num_bytes: 42888
num_examples: 327
- name: test_main_oov
num_bytes: 68787
num_examples: 480
- name: test_rare
num_bytes: 51435
num_examples: 379
- name: test_memorization
num_bytes: 144907
num_examples: 1022
download_size: 946934
dataset_size: 1717471
- config_name: task6b_definition_mcq
features:
- name: word
dtype: string
- name: base
dtype: string
- name: affix
dtype: string
- name: function
dtype: string
- name: gold_gloss
dtype: string
- name: distractors
sequence: string
- name: pretrain_status
dtype: string
- name: derived_freq
dtype: int64
- name: base_exposure
dtype: int64
splits:
- name: dev
num_bytes: 580104
num_examples: 1242
- name: main
num_bytes: 152581
num_examples: 324
- name: main_oov
num_bytes: 224637
num_examples: 473
- name: rare
num_bytes: 178322
num_examples: 375
- name: memorization
num_bytes: 480506
num_examples: 1013
download_size: 767173
dataset_size: 1616150
configs:
- config_name: task1_inflection
data_files:
- split: train
path: task1_inflection/train-*
- split: dev
path: task1_inflection/dev-*
- split: test
path: task1_inflection/test-*
- split: test_rare
path: task1_inflection/test_rare-*
- split: test_memorization
path: task1_inflection/test_memorization-*
- config_name: task2_deriv_segmentation
data_files:
- split: train
path: task2_deriv_segmentation/train-*
- split: dev
path: task2_deriv_segmentation/dev-*
- split: test_main
path: task2_deriv_segmentation/test_main-*
- split: test_memorization
path: task2_deriv_segmentation/test_memorization-*
- split: test_oov
path: task2_deriv_segmentation/test_oov-*
- config_name: task3_derivation
data_files:
- split: train
path: task3_derivation/train-*
- split: dev
path: task3_derivation/dev-*
- split: test_main
path: task3_derivation/test_main-*
- split: test_memorization
path: task3_derivation/test_memorization-*
- split: test_oov
path: task3_derivation/test_oov-*
- config_name: task4_compound
data_files:
- split: train
path: task4_compound/train-*
- split: dev
path: task4_compound/dev-*
- split: test_main
path: task4_compound/test_main-*
- split: test_rare
path: task4_compound/test_rare-*
- split: test_memorization
path: task4_compound/test_memorization-*
- split: test_hardest
path: task4_compound/test_hardest-*
- config_name: task5_affix_function
data_files:
- split: train
path: task5_affix_function/train-*
- split: dev
path: task5_affix_function/dev-*
- split: test
path: task5_affix_function/test-*
- config_name: task6a_definition
data_files:
- split: train
path: task6a_definition/train-*
- split: dev
path: task6a_definition/dev-*
- split: test_main
path: task6a_definition/test_main-*
- split: test_main_oov
path: task6a_definition/test_main_oov-*
- split: test_rare
path: task6a_definition/test_rare-*
- split: test_memorization
path: task6a_definition/test_memorization-*
- config_name: task6b_definition_mcq
data_files:
- split: dev
path: task6b_definition_mcq/dev-*
- split: main
path: task6b_definition_mcq/main-*
- split: main_oov
path: task6b_definition_mcq/main_oov-*
- split: rare
path: task6b_definition_mcq/rare-*
- split: memorization
path: task6b_definition_mcq/memorization-*
- config_name: verb_cloze
data_files:
- split: train
path: verb_cloze/train.jsonl
- split: validation
path: verb_cloze/validation.jsonl
- split: test
path: verb_cloze/test.jsonl
- split: test_rare
path: verb_cloze/test_rare.jsonl
---
# MorphBench — German Morphology Evaluation Suite
A benchmark for **morphology-aware tokenizers and language models** in German.
Eight numbered tasks probe inflection, segmentation, derivation, compounding, affix
semantics, and whole-word meaning. Each task is a **config**; difficulty/generalization
tiers are **splits**.
```python
from datasets import load_dataset
ds = load_dataset("yuanxin112/morphbench-de", "task3_derivation", split="test_main")
```
## Tasks
### `task1_inflection`
Produce the inflected form from a lemma + features.
**input** `interagieren` + `v;ind;pl;1;pst` → **output** `interagierten`
columns: `lemma, feats, target, status`
### `task2_deriv_segmentation` — *derivational segmentation*
Split a **derived** word into base + affix.
**input** `Dreher` → **output** `drehen|er`
columns: `word, segmentation, status`
### `task3_derivation`
Build the derived word from a base + affix.
**input** `Apotheke` + `pflichtig`**output** `apothekenpflichtig`
columns: `base, affix, target, status`
### `task4_compound`
Split a compound into its parts.
**input** `Freiheitsheld` → **output** `Freiheit|Held`
columns: `word, segmentation, difficulty, source`
### `task5_affix_function`
Given a derived word, classify the **semantic function of its affix** (13 classes:
`negation, without, agent_person, make_become, …`).
**input** `stimmlos` → **output** `without`
columns: `word, function, freq, status`
### `task6a_definition`
Generate the dictionary gloss of a derived word.
**input** `Malocher`**output** `Arbeitnehmer, der überwiegend körperlich hart … arbeitet`
columns: `word, gloss, base, affix, function, derived_freq, base_exposure, status`
### `task6b_definition_mcq`
Multiple-choice version of 6a: pick the correct gloss among hard distractors.
columns: `word, base, affix, function, gold_gloss, distractors, pretrain_status, derived_freq, base_exposure`
## Splits — how items are bucketed
Every test split is defined by the **pretraining exposure** of the item's parts
(frequency in the BabyLM-style German training corpus): *seen* = frequency above a
threshold, *unseen* = frequency 0. The headline idea everywhere is **the target is
UNSEEN while its base/lemma IS seen** (compositional generalization); `memorization`
and `rare`/`OOV`/`hardest` are the seen / harder controls. `train`, `dev` are
training / validation.
**`task1_inflection`** — by *(lemma seen?)* × *(this form seen?)*:
| split | condition |
|-------|-----------|
| `test` (main) | lemma seen, form **unseen** |
| `test_memorization` | lemma seen, form seen |
| `test_rare` | lemma **unseen**, form unseen |
**`task2_deriv_segmentation`, `task3_derivation`** — by *(base seen?)* × *(derived seen?)*, where *seen* = corpus freq ≥ 1:
| split | condition |
|-------|-----------|
| `test_main` | base seen, derived **unseen** (compositional generalization) |
| `test_memorization` | base seen, derived seen |
| `test_OOV` | base **unseen**, derived unseen |
**`task4_compound`** — by *(compound word seen?)* × *(all components seen?)*, where compound *seen* = freq ≥ 1 and a component is *seen* = freq ≥ 5:
| split | condition | what it tests |
|-------|-----------|---------------|
| `test_main` | compound **unseen**, all components seen | compositional generalization |
| `test_memorization` | compound seen, all components seen | rote recall |
| `test_rare` | compound seen, some component rare | mixed |
| `test_hardest` | compound **unseen**, some component unseen | hardest |
**`task6a_definition`, `task6b_definition_mcq`** — by the derived word's corpus frequency `derived_freq`, splitting the *unseen* case by `base_exposure`:
| split | condition |
|-------|-----------|
| `memorization` | `derived_freq ≥ 20` |
| `rare` | `derived_freq` 1–5 |
| `main` | `derived_freq = 0` and `base_exposure ≥ 300` (base familiar) |
| `main_oov` | `derived_freq = 0` and `base_exposure < 300` (base also OOV) |
**`task5_affix_function`** uses a plain `train` / `dev` / `test` split (no difficulty buckets). The `status` / `pretrain_cell` column on each row
records the exposure cell directly, e.g. `base_seen+derived_unseen`, `lem_seen+form_unseen`.
> Note: the German "seen" thresholds are lower than the English suite (derivation/
> segmentation use freq ≥ 1; definition uses `derived_freq ≥ 20`, `base_exposure ≥ 300`).
## Provenance
Built from German Wiktionary (via [kaikki.org](https://kaikki.org) / wiktextract) and UniMorph.
Companion lexical resource: [`yuanxin112/wiktionary-morph`](https://huggingface.co/datasets/yuanxin112/wiktionary-morph).
English counterpart: [`yuanxin112/morphbench-en`](https://huggingface.co/datasets/yuanxin112/morphbench-en).
## License
Derived from Wiktionary — [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/);
attribute Wiktionary and its contributors.
## `verb_cloze` — Contextual Verb-Inflection Cloze (added config)
Leave-one-out cloze: given a verb `lemma`, partial `feats` (one morphological
dimension withheld), and a natural sentence with the target verb replaced by a
blank marker, generate the inflected form. Splits are **lemma-disjoint**.
Sentences come from Universal Dependencies treebanks (a *derivative*; CC BY-SA
4.0 — verify per-treebank licenses, e.g. English ParTUT is CC BY-NC-SA).
```python
from datasets import load_dataset
ds = load_dataset("yuanxin112/morphbench-de", "verb_cloze")
```