espsluar commited on
Commit
faae357
·
verified ·
1 Parent(s): 068e6a2

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +96 -28
README.md CHANGED
@@ -4,37 +4,105 @@ dataset_info:
4
  - name: example_html
5
  dtype: string
6
  - name: expected_json
7
- struct:
8
- - name: author
9
- dtype: string
10
- - name: favicon
11
- dtype: string
12
- - name: id
13
- dtype: string
14
- - name: image
15
- dtype: string
16
- - name: published_date
17
- dtype: string
18
- - name: text
19
- dtype: string
20
- - name: title
21
- dtype: string
22
- - name: url
23
- dtype: string
24
  splits:
25
  - name: train
26
- num_bytes: 32186875
27
  num_examples: 450
28
  - name: test
29
- num_bytes: 2516130
30
  num_examples: 50
31
- download_size: 7746196
32
- dataset_size: 34703005
33
- configs:
34
- - config_name: default
35
- data_files:
36
- - split: train
37
- path: data/train-*
38
- - split: test
39
- path: data/test-*
40
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  - name: example_html
5
  dtype: string
6
  - name: expected_json
7
+ dtype:
8
+ url: string
9
+ title: string
10
+ text: string
11
+ author: string
12
+ published_date: string
13
+ image: string
14
+ favicon: string
15
+ id: string
 
 
 
 
 
 
 
 
16
  splits:
17
  - name: train
 
18
  num_examples: 450
19
  - name: test
 
20
  num_examples: 50
21
+ task_categories:
22
+ - text-generation
23
+ - question-answering
24
+ language:
25
+ - en
26
+ size_categories:
27
+ - n<1K
 
 
28
  ---
29
+
30
+ # CrawlerLM: HTML-to-JSON Dataset
31
+
32
+ A synthetic dataset for training language models to extract structured JSON data from raw HTML.
33
+
34
+ ## Dataset Description
35
+
36
+ This dataset contains HTML pages paired with their structured JSON representations, designed for fine-tuning small language models for web scraping and information extraction tasks.
37
+
38
+ ### Dataset Structure
39
+
40
+ Each example contains:
41
+ - `example_html`: Raw HTML content from real web pages
42
+ - `expected_json`: Structured extraction with fields:
43
+ - `url`: Page URL
44
+ - `title`: Page title
45
+ - `text`: Main text content
46
+ - `author`: Author name (or null)
47
+ - `published_date`: Publication date (or null)
48
+ - `image`: Main image URL
49
+ - `favicon`: Favicon URL
50
+ - `id`: Unique identifier
51
+
52
+ ### Data Splits
53
+
54
+ - **Train**: 450 synthetic variations
55
+ - **Test**: 50 synthetic variations
56
+
57
+ ### Data Sources
58
+
59
+ - Base HTML samples from Common Crawl
60
+ - Structured extractions via Exa API
61
+ - Synthetic variations generated programmatically
62
+
63
+ ### Use Cases
64
+
65
+ - Fine-tuning small models for web scraping
66
+ - Training HTML-to-JSON extraction models
67
+ - Benchmarking structured data extraction
68
+
69
+ ## Usage
70
+
71
+ ```python
72
+ from datasets import load_dataset
73
+
74
+ dataset = load_dataset("espsluar/crawlerlm-html-to-json")
75
+
76
+ # Access splits
77
+ train_data = dataset["train"]
78
+ test_data = dataset["test"]
79
+
80
+ # Example
81
+ example = train_data[0]
82
+ print(f"HTML length: {len(example['example_html'])} chars")
83
+ print(f"Title: {example['expected_json']['title']}")
84
+ ```
85
+
86
+ ## Dataset Creation
87
+
88
+ Generated using the CrawlerLM pipeline:
89
+ 1. Sample diverse URLs from Common Crawl
90
+ 2. Filter for quality (SPA detection, content scoring)
91
+ 3. Extract structured data via Exa API
92
+ 4. Generate synthetic variations (wrappers, noise, perturbations)
93
+
94
+ ## License
95
+
96
+ MIT
97
+
98
+ ## Citation
99
+
100
+ ```bibtex
101
+ @misc{crawlerlm2025,
102
+ author = {Jack Luar},
103
+ title = {CrawlerLM: HTML-to-JSON Dataset},
104
+ year = {2025},
105
+ publisher = {HuggingFace},
106
+ howpublished = {\url{https://huggingface.co/datasets/espsluar/crawlerlm-html-to-json}}
107
+ }
108
+ ```