Update README.md
Browse files# 🔎 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
# rescale=True rescales z-scores to [0, 100] for interpretability
detect = DETECT("ZurichNLP/detect:best.ckpt", rescale=True)
complex = [
"They are culturally akin to the coastal peoples of Papua New Guinea."
]
simple = [
"They are culturally similar to the people of Papua New Guinea."
]
references = [[
"They are culturally similar to the coastal peoples of Papua New Guinea.",
"They are similar to the Papua New Guinea people living on the coast."
]]
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: {to come}