Jerryxrc commited on
Commit
311c1fe
·
verified ·
1 Parent(s): c3b050a

Initial dataset release

Browse files
.gitignore ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ .DS_Store
2
+ __pycache__/
3
+ *.pyc
LICENSE ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Creative Commons Attribution-NonCommercial 4.0 International
2
+
3
+ Copyright (c) 2026 Web4Style Metadata contributors
4
+
5
+ This work is licensed under the Creative Commons Attribution-NonCommercial
6
+ 4.0 International License.
7
+
8
+ You are free to:
9
+
10
+ - Share: copy and redistribute the material in any medium or format
11
+ - Adapt: remix, transform, and build upon the material
12
+
13
+ Under the following terms:
14
+
15
+ - Attribution: You must give appropriate credit, provide a link to the
16
+ license, and indicate if changes were made.
17
+ - NonCommercial: You may not use the material for commercial purposes.
18
+ - No additional restrictions: You may not apply legal terms or technological
19
+ measures that legally restrict others from doing anything the license
20
+ permits.
21
+
22
+ Full license text:
23
+ https://creativecommons.org/licenses/by-nc/4.0/legalcode
24
+
25
+ Human-readable summary:
26
+ https://creativecommons.org/licenses/by-nc/4.0/
27
+
28
+ Scope note:
29
+ This license applies to the author-written metadata and repository packaging
30
+ distributed in this repository. It does not grant rights to third-party
31
+ website content, trademarks, logos, photographs, or other external assets
32
+ that may be referenced by URL.
README.md ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: cc-by-nc-4.0
5
+ task_categories:
6
+ - text-classification
7
+ - text-generation
8
+ - summarization
9
+ pretty_name: Web4Style
10
+ size_categories:
11
+ - n<1K
12
+ configs:
13
+ - config_name: default
14
+ data_files:
15
+ - split: train
16
+ path: data/train-00000-of-00001.parquet
17
+ dataset_info:
18
+ features:
19
+ - name: id
20
+ dtype: string
21
+ - name: category
22
+ dtype: string
23
+ - name: website
24
+ dtype: string
25
+ - name: brief
26
+ dtype: string
27
+ - name: content
28
+ dtype: string
29
+ - name: function
30
+ dtype: string
31
+ - name: style
32
+ dtype: string
33
+ ---
34
+
35
+ # Web4Style
36
+
37
+ ## Dataset Summary
38
+
39
+ Web4Style is a website design understanding and retrieval dataset.
40
+
41
+ The current public release contains 300 examples from 300 public websites across 25 categories. It includes author-written annotations describing each site's high-level brief, content structure, functional patterns, and visual style.
42
+
43
+ This public release does not include screenshots or other third-party website assets.
44
+
45
+ ## What Is Included
46
+
47
+ Each row contains:
48
+
49
+ - `id`: unique sample identifier
50
+ - `category`: website category label
51
+ - `website`: original website URL used as reference
52
+ - `brief`: high-level design brief
53
+ - `content`: summary of the site's information architecture and content framing
54
+ - `function`: summary of the site's key interaction patterns and functional modules
55
+ - `style`: summary of the site's visual style and aesthetic direction
56
+
57
+ ## Data Files
58
+
59
+ - `data/train-00000-of-00001.parquet`: primary Hugging Face upload artifact
60
+ - `data/train.jsonl`: line-delimited JSON export of the same records
61
+ - `scripts/prepare_release.py`: reproducible conversion script from the local source JSON
62
+
63
+ ## Supported Tasks
64
+
65
+ Potential uses include:
66
+
67
+ - website category classification
68
+ - website design prompt generation
69
+ - structured description generation
70
+ - retrieval of stylistically similar websites
71
+ - benchmarking style-aware web understanding systems
72
+
73
+ ## Data Collection and Processing
74
+
75
+ The source dataset paired website screenshots with structured textual annotations. For this metadata-only release, the screenshot field was removed and the remaining annotation fields were retained.
76
+
77
+ The release script performs the following transformations:
78
+
79
+ - drops the original `image` field
80
+ - preserves the original non-image field names
81
+ - exports the cleaned records to Parquet and JSONL
82
+
83
+ ## Intended Use
84
+
85
+ Recommended uses:
86
+
87
+ - academic research
88
+ - benchmark construction
89
+ - retrieval and ranking experiments
90
+ - prompt engineering and evaluation for design-oriented language models
91
+
92
+ Not recommended uses:
93
+
94
+ - reconstructing or redistributing third-party website assets
95
+ - identity extraction or contact scraping
96
+ - legal assertions about ownership of third-party content
97
+
98
+ ## Licensing and Rights
99
+
100
+ This repository is intended to distribute only the dataset packaging and the author-written metadata fields included in this release.
101
+
102
+ The repository does not include screenshots, logos, photos, or other third-party website assets. Website URLs are provided for reference only. Rights to third-party website content, trademarks, brand assets, and media remain with their respective owners.
103
+
104
+ The metadata fields and repository packaging are released under the Creative Commons Attribution-NonCommercial 4.0 International license (`CC-BY-NC-4.0`).
105
+
106
+ ## Personal and Sensitive Information
107
+
108
+ The release is not intended to contain screenshots or raw copied page assets. However, source URLs may point to websites that contain public-facing company or contact information outside this repository.
109
+
110
+ This dataset is not intended for person-level profiling, identity inference, or contact extraction.
111
+
112
+ ## Biases and Limitations
113
+
114
+ - The dataset contains only 300 examples.
115
+ - Category coverage is curated and not representative of the full web.
116
+ - The annotation fields are subjective summaries.
117
+ - Websites change over time, so the linked sources may no longer match the original capture context.
118
+ - The dataset is better suited to style and structure understanding than to factual verification about the linked websites.
119
+
120
+ ## Release Notes
121
+
122
+ - Split count: `train=300`
123
+ - Unique websites: `300`
124
+ - Categories: `25`
125
+
126
+ ## Usage
127
+
128
+ ```python
129
+ from datasets import load_dataset
130
+
131
+ dataset = load_dataset("parquet", data_files="data/train-00000-of-00001.parquet")
132
+ print(dataset["train"][0])
133
+ ```
134
+
135
+ ## Publishing
136
+
137
+ This directory is structured to be pushed directly to a Hugging Face dataset repository root.
138
+
139
+ ```bash
140
+ cd hf_metadata_release
141
+ git init
142
+ git add .
143
+ git commit -m "Initial dataset release"
144
+ git remote add origin https://huggingface.co/datasets/<namespace>/<repo_name>
145
+ git push origin main
146
+ ```
147
+
148
+ ## Takedown and Corrections
149
+
150
+ If you are a rights holder and believe a specific record should be removed or revised, contact the maintainers with the relevant `id` and `website`.
data/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:303d7349b7758dc7aee601621f1485ac22cccce057fabaf0dcab3666549ea7b5
3
+ size 435825
data/train.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
scripts/prepare_release.py ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import json
4
+ from pathlib import Path
5
+
6
+ import pandas as pd
7
+
8
+
9
+ REPO_ROOT = Path(__file__).resolve().parents[2]
10
+ RELEASE_ROOT = Path(__file__).resolve().parents[1]
11
+ SOURCE_JSON = REPO_ROOT / "dataset_with_images.json"
12
+ OUTPUT_DIR = RELEASE_ROOT / "data"
13
+ PARQUET_PATH = OUTPUT_DIR / "train-00000-of-00001.parquet"
14
+ JSONL_PATH = OUTPUT_DIR / "train.jsonl"
15
+
16
+
17
+ def load_records() -> list[dict]:
18
+ with SOURCE_JSON.open("r", encoding="utf-8") as f:
19
+ raw_records = json.load(f)
20
+
21
+ records = []
22
+ for raw in raw_records:
23
+ record = {
24
+ "id": raw["id"].strip(),
25
+ "category": raw["category"].strip(),
26
+ "website": raw["website"].strip(),
27
+ "brief": raw["brief"].strip(),
28
+ "content": raw["content"].strip(),
29
+ "function": raw["function"].strip(),
30
+ "style": raw["style"].strip(),
31
+ }
32
+ records.append(record)
33
+
34
+ return sorted(records, key=lambda item: item["id"])
35
+
36
+
37
+ def validate_records(records: list[dict]) -> None:
38
+ ids = [record["id"] for record in records]
39
+ if len(ids) != len(set(ids)):
40
+ raise ValueError("Duplicate ids detected in release data.")
41
+
42
+ for record in records:
43
+ for key, value in record.items():
44
+ if not isinstance(value, str) or not value:
45
+ raise ValueError(f"Invalid value for {key!r} in record {record['id']}.")
46
+
47
+
48
+ def write_jsonl(records: list[dict]) -> None:
49
+ with JSONL_PATH.open("w", encoding="utf-8") as f:
50
+ for record in records:
51
+ f.write(json.dumps(record, ensure_ascii=False) + "\n")
52
+
53
+
54
+ def write_parquet(records: list[dict]) -> None:
55
+ frame = pd.DataFrame.from_records(records)
56
+ frame.to_parquet(PARQUET_PATH, index=False)
57
+
58
+
59
+ def main() -> None:
60
+ OUTPUT_DIR.mkdir(parents=True, exist_ok=True)
61
+ records = load_records()
62
+ validate_records(records)
63
+ write_jsonl(records)
64
+ write_parquet(records)
65
+ print(f"Wrote {len(records)} records to {JSONL_PATH}")
66
+ print(f"Wrote {len(records)} records to {PARQUET_PATH}")
67
+
68
+
69
+ if __name__ == "__main__":
70
+ main()