Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,26 +1,80 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
num_examples: 4500
|
| 14 |
-
- name: validation
|
| 15 |
-
num_bytes: 1582995
|
| 16 |
-
num_examples: 500
|
| 17 |
-
download_size: 8846353
|
| 18 |
-
dataset_size: 15910390
|
| 19 |
-
configs:
|
| 20 |
-
- config_name: default
|
| 21 |
-
data_files:
|
| 22 |
-
- split: train
|
| 23 |
-
path: data/train-*
|
| 24 |
-
- split: validation
|
| 25 |
-
path: data/validation-*
|
| 26 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- de
|
| 5 |
+
tags:
|
| 6 |
+
- legal
|
| 7 |
+
- german-law
|
| 8 |
+
- question-answering
|
| 9 |
+
- bgb
|
| 10 |
+
- stgb
|
| 11 |
+
size_categories:
|
| 12 |
+
- 1K<n<10K
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
---
|
| 14 |
+
|
| 15 |
+
# GerLayQA 5K Filtered Raw
|
| 16 |
+
|
| 17 |
+
## Dataset Description
|
| 18 |
+
|
| 19 |
+
This is a cleaned and filtered subset of the GerLayQA (German Legal Question Answering) dataset, specifically designed for German legal question-answering tasks. The dataset has been split into train and validation sets for proper model evaluation.
|
| 20 |
+
|
| 21 |
+
## Dataset Statistics
|
| 22 |
+
|
| 23 |
+
- **Total Samples**: 5000
|
| 24 |
+
- **Train Samples**: 4500 (90.0%)
|
| 25 |
+
- **Validation Samples**: 500 (10.0%)
|
| 26 |
+
|
| 27 |
+
### Train Set
|
| 28 |
+
- **Average Question Length**: 1100.3 characters (161.6 words)
|
| 29 |
+
- **Average Answer Length**: 2002.2 characters (277.7 words)
|
| 30 |
+
- **Unique Legal Paragraphs**: 1095
|
| 31 |
+
|
| 32 |
+
### Validation Set
|
| 33 |
+
- **Average Question Length**: 1084.1 characters (159.4 words)
|
| 34 |
+
- **Average Answer Length**: 2001.7 characters (276.6 words)
|
| 35 |
+
- **Unique Legal Paragraphs**: 339
|
| 36 |
+
|
| 37 |
+
## Dataset Structure
|
| 38 |
+
|
| 39 |
+
Each sample contains:
|
| 40 |
+
- `question`: German legal question
|
| 41 |
+
- `answer`: Detailed legal answer with citations
|
| 42 |
+
- `paragraphs`: Relevant legal paragraphs (BGB, StGB, etc.)
|
| 43 |
+
|
| 44 |
+
## Usage
|
| 45 |
+
|
| 46 |
+
```python
|
| 47 |
+
from datasets import load_dataset
|
| 48 |
+
|
| 49 |
+
# Load the dataset with splits
|
| 50 |
+
dataset = load_dataset("DomainLLM/gerlayqa_5k_filtered_raw")
|
| 51 |
+
|
| 52 |
+
# Access train and validation splits
|
| 53 |
+
train_data = dataset['train']
|
| 54 |
+
val_data = dataset['validation']
|
| 55 |
+
|
| 56 |
+
# Example usage
|
| 57 |
+
print(f"Train samples: {len(train_data)}")
|
| 58 |
+
print(f"Validation samples: {len(val_data)}")
|
| 59 |
+
print(f"Sample question: {train_data[0]['question']}")
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
## Cleaning Process
|
| 63 |
+
|
| 64 |
+
This dataset has been cleaned using GPT-4o-mini to:
|
| 65 |
+
- Remove HTML tags and formatting
|
| 66 |
+
- Remove lawyer contact information and signatures
|
| 67 |
+
- Normalize whitespace and punctuation
|
| 68 |
+
- Preserve all legal content and citations
|
| 69 |
+
|
| 70 |
+
## Split Information
|
| 71 |
+
|
| 72 |
+
The dataset is split into:
|
| 73 |
+
- **Train**: 4,500 samples (90%) for model training
|
| 74 |
+
- **Validation**: 500 samples (10%) for model evaluation
|
| 75 |
+
|
| 76 |
+
The split was created using a fixed random seed (42) to ensure reproducibility.
|
| 77 |
+
|
| 78 |
+
## License
|
| 79 |
+
|
| 80 |
+
This dataset is based on the original GerLayQA dataset and is released under the MIT license.
|