File size: 1,987 Bytes
7e2809c
 
 
 
 
 
8de3a4c
 
df62dce
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
license: mit
language:
- de
base_model:
- benjamin/roberta-base-wechsel-german
tags:
- simplification
---

# 🧭 DETECT: Determining Ease and Textual Clarity of German Text Simplifications

This repository contains the **trained checkpoint for DETECT**, an automated **German Automatic Text Simplification (ATS)** quality evaluation metric introduced in
> *“DETECT: Determining Ease and Textual Clarity of German Text Simplifications”*.

DETECT provides fine-grained scoring across **simplicity**, **meaning preservation**, and **fluency**, along with a composite **total** score.
Further information about the metric can be found in the description of the [GitHub repository](https://github.com/ZurichNLP/DETECT) or in our accompanying paper.

> 🔎 **Note**
> - This repository hosts a **checkpoint file only**.
> - You must load it **through the DETECT codebase** (see usage below).
> - It is **not** directly compatible with `AutoModel.from_pretrained()`.
> - The model supports **reference-based** text simplification evaluation only — it does **not** provide reference-free evaluation.

---

## ⚙️ Usage

Clone and install the DETECT codebase:
```bash
git clone https://github.com/ZurichNLP/DETECT.git
cd DETECT/detect
pip install -e .
```

Then, in Python:

```from detect import DETECT

# Initialize model
detect = DETECT("ZurichNLP/DETECT/best-LENS_multi_wechsel_reducedhs-epoch=04.ckpt", rescale=True)

complex = [
"Sie sind kulturell den Küstenbewohnern von Papua-Neuguinea verwandt."
]

simple = [
"Sie sind kulturell den Menschen in Papua-Neuguinea ähnlich."
]

references = [[
"Sie sind kulturell den Küstenbewohnern von Papua-Neuguinea ähnlich.",
"Sie ähneln den Menschen aus Papua-Neuguinea, die an der Küste leben."
]]

scores = detect.score(complex, simple, references, batch_size=8, devices=[0])
print(scores)
# [{'simplicity': 78.6, 'meaning_preservation': 80.1, 'fluency': 77.3, 'total': 78.3}]
```

## Citation

If you use DETECT, please cite: