Text Classification
Transformers
Safetensors
Czech
modernbert
legal
czech
legal-nlp
text-embeddings-inference
Instructions to use TrustHLT/ModernBERT-large-madon-formalism with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TrustHLT/ModernBERT-large-madon-formalism with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="TrustHLT/ModernBERT-large-madon-formalism")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("TrustHLT/ModernBERT-large-madon-formalism") model = AutoModelForSequenceClassification.from_pretrained("TrustHLT/ModernBERT-large-madon-formalism", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Improve model card: add paper link, GitHub repository, and metadata (#1)
Browse files- Improve model card: add paper link, GitHub repository, and metadata (e8b7f37ea00beb783dc8e7b7fba7f04b06babd8d)
Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -1,12 +1,31 @@
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
-
# Model Card for Model ID
|
| 6 |
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
If you want to use it for holistic formalism classification of Czech legal court documents, we suggest:
|
|
|
|
| 10 |
```python
|
| 11 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
|
| 12 |
|
|
@@ -16,7 +35,19 @@ tokenizer = AutoTokenizer.from_pretrained("TrustHLT/ModernBERT-large-madon-forma
|
|
| 16 |
pipe = pipeline("text-classification", model=model, tokenizer=tokenizer)
|
| 17 |
|
| 18 |
# The expected input is a full Czech legal court document
|
| 19 |
-
text = "
|
| 20 |
|
| 21 |
print(pipe(text))
|
| 22 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
+
pipeline_tag: text-classification
|
| 4 |
+
language:
|
| 5 |
+
- cs
|
| 6 |
+
tags:
|
| 7 |
+
- legal
|
| 8 |
+
- czech
|
| 9 |
+
- modernbert
|
| 10 |
+
- legal-nlp
|
| 11 |
---
|
|
|
|
| 12 |
|
| 13 |
+
# ModernBERT-large-madon-formalism
|
| 14 |
+
|
| 15 |
+
This model is a companion for the paper [Mining Legal Arguments to Study Judicial Formalism](https://huggingface.co/papers/2512.11374). It is part of the **MADON** project, which aims to study judicial reasoning in the decisions of Czech Supreme Courts.
|
| 16 |
+
|
| 17 |
+
## Model Description
|
| 18 |
+
This model is based on the ModernBERT architecture and was adapted to the Czech legal domain through continued pretraining on a corpus of over 300,000 Czech court decisions. It is specifically fine-tuned for the **holistic formalism classification** of full legal documents, identifying whether a judicial decision is formalistic or non-formalistic.
|
| 19 |
+
|
| 20 |
+
- **Task:** Holistic formalism classification
|
| 21 |
+
- **Language:** Czech
|
| 22 |
+
- **Dataset:** MADON (Czech Supreme Court decisions)
|
| 23 |
+
- **Repository:** [trusthlt/madon](https://github.com/trusthlt/madon)
|
| 24 |
+
|
| 25 |
+
## Usage
|
| 26 |
|
| 27 |
If you want to use it for holistic formalism classification of Czech legal court documents, we suggest:
|
| 28 |
+
|
| 29 |
```python
|
| 30 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
|
| 31 |
|
|
|
|
| 35 |
pipe = pipeline("text-classification", model=model, tokenizer=tokenizer)
|
| 36 |
|
| 37 |
# The expected input is a full Czech legal court document
|
| 38 |
+
text = "Dovolání se zamítá..." # Example Czech legal text
|
| 39 |
|
| 40 |
print(pipe(text))
|
| 41 |
```
|
| 42 |
+
|
| 43 |
+
## Citation
|
| 44 |
+
If you use this model or the MADON dataset in your research, please cite the following paper:
|
| 45 |
+
|
| 46 |
+
```bibtex
|
| 47 |
+
@article{madon2025mining,
|
| 48 |
+
title={Mining Legal Arguments to Study Judicial Formalism},
|
| 49 |
+
author={Kocián, Michal and Šavelka, Jaromír and Moravčík, Jakub and Gavenčiak, Tomáš and Harašta, Jakub and Štefánik, Michal},
|
| 50 |
+
journal={arXiv preprint arXiv:2512.11374},
|
| 51 |
+
year={2025}
|
| 52 |
+
}
|
| 53 |
+
```
|