Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
echr-od-datasets/*echr-website/
echr-scraping/datasets_documents/
# CaseLaw Analyzer - Exclude large data files
CaseLaw Analyzer/Data/echr_2_0_0.db
CaseLaw Analyzer/Data/*.json
CaseLaw Analyzer/Data/*.csv
CaseLaw Analyzer/Data/echr_2_0_0_raw_normalized/
CaseLaw Analyzer/Data/echr_2_0_0_structured_bow/
CaseLaw Analyzer/Data/echr_2_0_0_structured_tfidf/
CaseLaw Analyzer/Data/*.txt

# Keep only Python scripts, documentation, and small reference files
__pycache__/
131 changes: 131 additions & 0 deletions CaseLaw Analyzer/CASELAW_STATISTICS_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# 📊 HUDOC Caselaw Statistics Guide

## Εισαγωγή

Το αρχείο `caselaw_statistics.py` περιέχει **πλήρεις στατιστικές** για τον αριθμό περιπτώσεων που αναφέρουν κάθε άρθρο ή πρωτόκολλο της ΕΣΔΑ.

---

## 📈 Top 10 Άρθρα

| Κατάταξη | Άρθρο | Περιπτώσεις | Τίτλος |
|----------|-------|-----------|--------|
| 1 | **41** | **36,464** | Just Satisfaction (Αποζημίωση) |
| 2 | **6** | **33,757** | Right to Fair Trial (Δίκαιη Δίκη) |
| 3 | **35** | **16,060** | Admissibility (Παραδεκτότητα) |
| 4 | **P1-1** | **10,622** | Protection of Property (Ιδιοκτησία) |
| 5 | **8** | **11,237** | Right to Private Life (Ιδιωτική Ζωή) |
| 6 | **3** | **11,178** | Prohibition of Torture (Βασανισμός) |
| 7 | **5** | **9,632** | Right to Liberty (Ελευθερία) |
| 8 | **13** | **9,198** | Right to Remedy (Δικαίωμα Προσφυγής) |
| 9 | **10** | **6,036** | Freedom of Expression (Ελευθερία Έκφρασης) |
| 10 | **34** | **5,046** | Individual Petition (Αίτημα) |

---

## 🔧 Utility Functions

### 1. `get_caselaw_count(article)`
```python
from caselaw_statistics import get_caselaw_count

count = get_caselaw_count("6")
# Output: 33757
```

### 2. `get_top_n_articles(n=10)`
```python
from caselaw_statistics import get_top_n_articles

top_articles = get_top_n_articles(5)
for article, count, title in top_articles:
print(f"Article {article}: {count:,} cases")
```

### 3. `get_combined_violations(article1, article2)`
```python
from caselaw_statistics import get_combined_violations

combined = get_combined_violations("6", "8")
# Cases where BOTH articles violated
```

### 4. `get_article_subsections(article)`
```python
from caselaw_statistics import get_article_subsections

subsections = get_article_subsections("6")
# Returns: {"6-1": 28925, "6-2": 1398, ...}
```

### 5. `get_total_cases()`
```python
from caselaw_statistics import get_total_cases

total = get_total_cases()
# Output: Total ECHR cases
```

---

## 📊 Ανάλυση

### Σημασία Αριθμών Περιπτώσεων

**Άρθρο με > 10,000 περιπτώσεις (π.χ. Article 6)**
- ✅ Πολύ συχνή παραβίαση
- ✅ Πολύ σημαντικό για το δικαστήριο
- ✅ Υψηλή πιθανότητα παραβίασης

**Άρθρο με 1,000-10,000 περιπτώσεις (π.χ. Article 13)**
- ⚠️ Συχνή παραβίαση
- ⚠️ Σημαντικό αλλά όχι κρίσιμο
- ⚠️ Μέσο επίπεδο κινδύνου

**Άρθρο με < 1,000 περιπτώσεις (π.χ. Article 16)**
- ℹ️ Σπάνια παραβίαση
- ℹ️ Εξειδικευμένο θέμα
- ℹ️ Χαμηλό επίπεδο κινδύνου

---

## 💡 Χρήση

### Risk Assessment
```python
# Άρθρα με >10,000 περιπτώσεις = ΥΨΗΛΟΣ ΚΙΝΔΥΝΟΣ
if get_caselaw_count(article) > 10000:
risk_level = "HIGH"
```

### Ταξινόμηση Περιπτώσεων
```python
# Κατάταξη παρόμοιων περιπτώσεων ανά σημασία άρθρου
ranked = sorted(
similar_cases,
key=lambda x: get_caselaw_count(x.article),
reverse=True
)
```

### Εμπλουτισμός Prompts
```python
# Πρόσθεση στατιστικών στο LLM prompt
stats = get_article_comparison(["6", "8"])
prompt += f"Article statistics: {stats}"
```

---

## 🔗 Σχέση με άλλα Αρχεία

| Αρχείο | Σκοπός |
|--------|--------|
| **hudoc_keywords.py** | Λέξεις κλειδιά ανα άρθρο |
| **config.py** | Ρυθμίσεις συστήματος |
| **app.py** | Web interface |

---

**Last Updated:** 2024-12-20
**Version:** 1.0.0
Loading