The dataset viewer is not available for this split.
Error code: FeaturesError
Exception: ArrowInvalid
Message: JSON parse error: Invalid value. in row 0
Traceback: Traceback (most recent call last):
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 174, in _generate_tables
df = pandas_read_json(f)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 38, in pandas_read_json
return pd.read_json(path_or_buf, **kwargs)
File "/src/services/worker/.venv/lib/python3.9/site-packages/pandas/io/json/_json.py", line 815, in read_json
return json_reader.read()
File "/src/services/worker/.venv/lib/python3.9/site-packages/pandas/io/json/_json.py", line 1025, in read
obj = self._get_object_parser(self.data)
File "/src/services/worker/.venv/lib/python3.9/site-packages/pandas/io/json/_json.py", line 1051, in _get_object_parser
obj = FrameParser(json, **kwargs).parse()
File "/src/services/worker/.venv/lib/python3.9/site-packages/pandas/io/json/_json.py", line 1187, in parse
self._parse()
File "/src/services/worker/.venv/lib/python3.9/site-packages/pandas/io/json/_json.py", line 1403, in _parse
ujson_loads(json, precise_float=self.precise_float), dtype=None
ValueError: Expected object or value
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/split/first_rows.py", line 228, in compute_first_rows_from_streaming_response
iterable_dataset = iterable_dataset._resolve_features()
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 3422, in _resolve_features
features = _infer_features_from_batch(self.with_format(None)._head())
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 2187, in _head
return next(iter(self.iter(batch_size=n)))
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 2391, in iter
for key, example in iterator:
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 1882, in __iter__
for key, pa_table in self._iter_arrow():
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 1904, in _iter_arrow
yield from self.ex_iterable._iter_arrow()
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 499, in _iter_arrow
for key, pa_table in iterator:
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 346, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 177, in _generate_tables
raise e
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 151, in _generate_tables
pa_table = paj.read_json(
File "pyarrow/_json.pyx", line 308, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: JSON parse error: Invalid value. in row 0Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
WebSRC v1.0
WebSRC v1.0 is a dataset for reading comprehension on structural web pages. The task is to answer questions about web pages, which requires a system to have a comprehensive understanding of the spatial structure and logical structure. WebSRC consists of 6.4K web pages and 400K question-answer pairs about web pages. For each web page, we manually chose one segment from it and saved the corresponding HTML code, screenshot, and metadata like positions and sizes. Questions in WebSRC were created for each segment. Answers are either text spans from web pages or yes/no. Taking the HTML code, screenshot, metadata as well as question as input, a model is to predict the answer from the web page. Our dataset is the first one that provides HTML documents as well as images, and is larger in the number of domains and queries.
For more details, please refer to our paper WebSRC: A Dataset for Web-Based Structural Reading Comprehension. The Leaderboard of WebSRC v1.0 can be found here.
Data Format Description
The dataset for each website will be stored in dataset.csv in the directory
{domain-name}/{website-number}. The corresponding raw data (including HTML
files, screenshots, bounding box coordinates, and page names and urls) is
stored in the processed_data folder in the same directory.
In dataset.csv, each row corresponds to one question-answer data point
except the header. The meanings of each column are as follows:
question: a string, the question of this question-answer data point.id: a unique id for this question-answer data point. Eachidhas a length 14, the first two characters are the domain indicator, the following two number is the website name. The corresponding page id can be extracted byid[2:9], for example, id "sp160000100001" means this line is created from the sport domain, website 16, and the corresponding page is1600001.html.element_id: an integer, the tag id (corresponding to the tag'stidattribute in the HTML files) of the deepest tag in the DOM tree which contain all the answer. For yes/no question, there is no tag associated with the answer, so theelement_idis -1.answer_start: an integer, the char offset of the answer from the start of the content of the tag specified byelement_id. Note that before counting this number, we first eliminate all the inner tags in the specified tag and replace all the consecutive whitespaces with one space. For yes/no questions,answer_startis 1 for answer "yes" and 0 for answer "no".answer: a string, the answer of this question-answer data point.
Data Statistics
We roughly divided the questions in WebSRC v1.0 into three categories: KV, Compare, and Table. The detailed definitions can be found in our paper. The numbers of websites, webpages, and QAs corresponding to the three categories are as follows:
| Type | # Websites | # Webpages | # QAs |
|---|---|---|---|
| KV | 34 | 3,207 | 168,606 |
| Comparison | 15 | 1,339 | 68,578 |
| Table | 21 | 1,901 | 163,314 |
The statistics of the dataset splits are as follows:
| Split | # Websites | # Webpages | # QAs |
|---|---|---|---|
| Train | 50 | 4,549 | 307,315 |
| Dev | 10 | 913 | 52,826 |
| Test | 10 | 985 | 40,357 |
Obtain Test Result
For test set evaluation, please send your prediction files to [email protected] and [email protected] with title "WebSRC Test: <your model name>+<your institution>". For evaluation, the prediction files should contain two files:
// prediction.json
// A json format file, keys are ids and values are the predicted answers (string).
{
"sp160000100001": "predicted answer",
"sp160000100002": "...",
//...
}
// tag_prediction.json
// A json format file, keys are ids and values are the predicted tag tid (int)
{
"sp160000100001": -1,
"sp160000100002": -1,
//...
}
We encourage to submit results from at least three runs with different random seeds to reduce the uncertainty of the experiments. Please place prediction files for each run in different directories and submit a zipped file. The average test result will be sent by email.
Reference
If you use any source codes or datasets included in this repository in your work, please cite the corresponding papers. The bibtex are listed below:
@inproceedings{chen-etal-2021-websrc,
title = "{W}eb{SRC}: A Dataset for Web-Based Structural Reading Comprehension",
author = "Chen, Xingyu and
Zhao, Zihan and
Chen, Lu and
Ji, JiaBao and
Zhang, Danyang and
Luo, Ao and
Xiong, Yuxuan and
Yu, Kai",
booktitle = "Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing",
month = nov,
year = "2021",
address = "Online and Punta Cana, Dominican Republic",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2021.emnlp-main.343",
pages = "4173--4185",
abstract = "Web search is an essential way for humans to obtain information, but it{'}s still a great challenge for machines to understand the contents of web pages. In this paper, we introduce the task of web-based structural reading comprehension. Given a web page and a question about it, the task is to find an answer from the web page. This task requires a system not only to understand the semantics of texts but also the structure of the web page. Moreover, we proposed WebSRC, a novel Web-based Structural Reading Comprehension dataset. WebSRC consists of 400K question-answer pairs, which are collected from 6.4K web pages with corresponding HTML source code, screenshots, and metadata. Each question in WebSRC requires a certain structural understanding of a web page to answer, and the answer is either a text span on the web page or yes/no. We evaluate various strong baselines on our dataset to show the difficulty of our task. We also investigate the usefulness of structural information and visual features. Our dataset and baselines have been publicly available.",
}
- Downloads last month
- 36