Spaces:
Sleeping
Sleeping
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,10 +1,69 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: docker
|
|
|
|
| 7 |
pinned: false
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: GDPR Cases Demo
|
| 3 |
+
emoji: 🏛️
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
sdk: docker
|
| 7 |
+
app_file: app.py
|
| 8 |
pinned: false
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# GDPR Cases - Interactive Demo
|
| 12 |
+
|
| 13 |
+
An interactive Streamlit application for exploring GDPR formalization cases and understanding step-by-step rule evaluation using the Pythen framework.
|
| 14 |
+
|
| 15 |
+
## Features
|
| 16 |
+
|
| 17 |
+
- **Dataset Browsing**: Browse all 60 verified GDPR cases from the dataset
|
| 18 |
+
- **Sample Selection**: Choose any sample by article and ID
|
| 19 |
+
- **Scenario Viewing**: Read the complete legal scenario for each case
|
| 20 |
+
- **Facts Display**: View extracted atomic facts used in evaluation
|
| 21 |
+
- **Rule Tree Visualization**: Inspect the formal rule tree in JSON format
|
| 22 |
+
- **Quality Metrics**: See evaluation scores from multiple verifiers
|
| 23 |
+
- **Step-by-Step Evaluation**: Understand how Pythen evaluates rules
|
| 24 |
+
- **Ground Truth**: View the expected legal outcome for each case
|
| 25 |
+
|
| 26 |
+
## Dataset
|
| 27 |
+
|
| 28 |
+
This demo uses the **GDPR Cases** dataset (`nguyenthanhasia/gdpr-cases`):
|
| 29 |
+
- **60 verified samples** of GDPR formalization cases
|
| 30 |
+
- **11 columns** including scenario, rule tree, facts, and evaluation scores
|
| 31 |
+
- **High quality**: All samples verified by legal experts
|
| 32 |
+
|
| 33 |
+
## How It Works
|
| 34 |
+
|
| 35 |
+
### Rule Evaluation Process
|
| 36 |
+
|
| 37 |
+
1. **Parse Rule Tree**: Hierarchical structure of conditions and predicates
|
| 38 |
+
2. **Extract Facts**: Atomic facts from the legal scenario
|
| 39 |
+
3. **Traverse Tree**: Evaluate from root through all nodes
|
| 40 |
+
4. **Apply Operators**:
|
| 41 |
+
- `ANY`: At least one condition must be true
|
| 42 |
+
- `ALL`: All conditions must be true
|
| 43 |
+
5. **Derive Label**: Final boolean result (TRUE/FALSE)
|
| 44 |
+
|
| 45 |
+
### Pythen Framework
|
| 46 |
+
|
| 47 |
+
Pythen is a formal representation framework for legal rules that:
|
| 48 |
+
- Separates conditions from exceptions
|
| 49 |
+
- Uses logical operators (ANY, ALL) for composition
|
| 50 |
+
- Enables automated evaluation of legal provisions
|
| 51 |
+
- Supports complex nested rule structures
|
| 52 |
+
|
| 53 |
+
## Citation
|
| 54 |
+
|
| 55 |
+
If you use this demo or dataset, please cite:
|
| 56 |
+
|
| 57 |
+
```bibtex
|
| 58 |
+
@article{nguyen2026gdpr,
|
| 59 |
+
title={GDPR Auto-Formalization with AI Agents and Human Verification},
|
| 60 |
+
author={Nguyen, Ha Thanh and Fungwacharakorn, Wachara and Wehnert, Sabine and Zin, May Myo and Kong, Yuntao and Xue, Jieying and Araszkiewicz, Michał and Goebel, Randy and Satoh, Ken},
|
| 61 |
+
journal={arXiv preprint arXiv:2604.14607},
|
| 62 |
+
year={2026}
|
| 63 |
+
}
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
## Related Resources
|
| 67 |
+
|
| 68 |
+
- [Dataset on Hugging Face](https://huggingface.co/datasets/nguyenthanhasia/gdpr-cases)
|
| 69 |
+
- [Paper on arXiv](https://arxiv.org/abs/2604.14607)
|