Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
task_categories:
|
| 5 |
+
- text-classification
|
| 6 |
+
- token-classification
|
| 7 |
+
tags:
|
| 8 |
+
- json
|
| 9 |
+
- validation
|
| 10 |
+
- semantic-errors
|
| 11 |
+
- synthetic-data
|
| 12 |
+
size_categories:
|
| 13 |
+
- n<1K
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# JSON SemVal Synthetic v1
|
| 17 |
+
|
| 18 |
+
Synthetic JSON+Schema corruptions for semantic validation training.
|
| 19 |
+
|
| 20 |
+
## Dataset Description
|
| 21 |
+
|
| 22 |
+
This dataset contains synthetically generated JSON payloads with controlled semantic errors for training ML models to detect and fix JSON validation issues.
|
| 23 |
+
|
| 24 |
+
### Dataset Structure
|
| 25 |
+
|
| 26 |
+
Each example in the dataset contains:
|
| 27 |
+
|
| 28 |
+
- `schema`: JSON Schema definition
|
| 29 |
+
- `clean_json`: Valid JSON payload conforming to the schema
|
| 30 |
+
- `corrupt_json`: Corrupted JSON with semantic errors
|
| 31 |
+
- `error_type`: Type of error introduced (e.g., type_mismatch, format_violation, enum_violation)
|
| 32 |
+
- `jsonpath`: JSONPath to the location of the error
|
| 33 |
+
- `fix_action`: Suggested fix action (e.g., cast_number, parse_date_iso, map_enum)
|
| 34 |
+
|
| 35 |
+
### Error Types
|
| 36 |
+
|
| 37 |
+
- `type_mismatch` - Wrong data type (e.g., string instead of integer)
|
| 38 |
+
- `format_violation` - Invalid format (e.g., bad date format)
|
| 39 |
+
- `enum_violation` - Invalid enum value
|
| 40 |
+
- `missing_required` - Missing required field
|
| 41 |
+
- `extra_property` - Unexpected additional property
|
| 42 |
+
- `range_violation` - Value outside allowed range
|
| 43 |
+
- `pattern_violation` - String doesn't match regex pattern
|
| 44 |
+
|
| 45 |
+
### Data Splits
|
| 46 |
+
|
| 47 |
+
- **Train**: 30 examples
|
| 48 |
+
- **Test**: 10 examples
|
| 49 |
+
|
| 50 |
+
### Usage
|
| 51 |
+
|
| 52 |
+
```python
|
| 53 |
+
from datasets import load_dataset
|
| 54 |
+
|
| 55 |
+
dataset = load_dataset("thearnabsarkar/json-semval-synth-v1")
|
| 56 |
+
|
| 57 |
+
# Access train split
|
| 58 |
+
train_data = dataset["train"]
|
| 59 |
+
|
| 60 |
+
# Example usage
|
| 61 |
+
for example in train_data:
|
| 62 |
+
print(f"Error type: {example['error_type']}")
|
| 63 |
+
print(f"JSONPath: {example['jsonpath']}")
|
| 64 |
+
print(f"Fix action: {example['fix_action']}")
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
### Dataset Creation
|
| 68 |
+
|
| 69 |
+
This dataset was generated using the JSON Semantic Validator's synthetic data generation pipeline, which:
|
| 70 |
+
|
| 71 |
+
1. Generates diverse JSON schemas
|
| 72 |
+
2. Creates valid JSON payloads
|
| 73 |
+
3. Introduces controlled corruptions
|
| 74 |
+
4. Labels each corruption with error type and location
|
| 75 |
+
|
| 76 |
+
### License
|
| 77 |
+
|
| 78 |
+
MIT
|
| 79 |
+
|
| 80 |
+
### Citation
|
| 81 |
+
|
| 82 |
+
If you use this dataset, please cite:
|
| 83 |
+
|
| 84 |
+
```bibtex
|
| 85 |
+
@misc{json-semval-synth-v1,
|
| 86 |
+
author = {Arnab Sarkar},
|
| 87 |
+
title = {JSON SemVal Synthetic v1},
|
| 88 |
+
year = {2025},
|
| 89 |
+
publisher = {Hugging Face},
|
| 90 |
+
url = {https://huggingface.co/datasets/thearnabsarkar/json-semval-synth-v1}
|
| 91 |
+
}
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
### Related Resources
|
| 95 |
+
|
| 96 |
+
- **Model**: [thearnabsarkar/json-semval-minilm-v1](https://huggingface.co/thearnabsarkar/json-semval-minilm-v1) (coming soon)
|
| 97 |
+
- **Space**: [thearnabsarkar/json-semantic-validator](https://huggingface.co/spaces/thearnabsarkar/json-semantic-validator) (coming soon)
|
| 98 |
+
- **Code**: [GitHub Repository](https://github.com/thearnabsarkar/json-semantic-validator) (if applicable)
|
| 99 |
+
|