Datasets:
The dataset viewer is not available for this split.
Error code: FeaturesError
Exception: ArrowInvalid
Message: JSON parse error: Column() changed from object to string in row 0
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 183, in _generate_tables
df = pandas_read_json(f)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 38, in pandas_read_json
return pd.read_json(path_or_buf, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pandas/io/json/_json.py", line 815, in read_json
return json_reader.read()
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pandas/io/json/_json.py", line 1014, in read
obj = self._get_object_parser(self.data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pandas/io/json/_json.py", line 1040, in _get_object_parser
obj = FrameParser(json, **kwargs).parse()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pandas/io/json/_json.py", line 1176, in parse
self._parse()
File "/usr/local/lib/python3.12/site-packages/pandas/io/json/_json.py", line 1391, in _parse
self.obj = DataFrame(
^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pandas/core/frame.py", line 778, in __init__
mgr = dict_to_mgr(data, index, columns, dtype=dtype, copy=copy, typ=manager)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pandas/core/internals/construction.py", line 503, in dict_to_mgr
return arrays_to_mgr(arrays, columns, index, dtype=dtype, typ=typ, consolidate=copy)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pandas/core/internals/construction.py", line 114, in arrays_to_mgr
index = _extract_index(arrays)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pandas/core/internals/construction.py", line 680, in _extract_index
raise ValueError(
ValueError: Mixing dicts with non-Series may lead to ambiguous ordering.
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 243, in compute_first_rows_from_streaming_response
iterable_dataset = iterable_dataset._resolve_features()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 3608, in _resolve_features
features = _infer_features_from_batch(self.with_format(None)._head())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2368, in _head
return next(iter(self.iter(batch_size=n)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2573, in iter
for key, example in iterator:
^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2060, in __iter__
for key, pa_table in self._iter_arrow():
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2082, in _iter_arrow
yield from self.ex_iterable._iter_arrow()
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 544, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 383, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 186, in _generate_tables
raise e
File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 160, in _generate_tables
pa_table = paj.read_json(
^^^^^^^^^^^^^^
File "pyarrow/_json.pyx", line 342, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 155, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: JSON parse error: Column() changed from object to string 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.
Nested Crossword Clues
A dataset of English sentences with recursively nested crossword clue definitions. Each example starts from a natural sentence sampled from English Wikipedia, where content words are replaced by crossword-style definitions from CrosswordQA. The definitions themselves are then recursively nested — words within clues are replaced by further clues — up to 10 levels deep.
Example
Original sentence (level 0):
He developed the theory of relativity.
Level 1 (words replaced with crossword clues):
He [Brought to maturity] the [Hypothesis] of [Family connection].
Level 2 (words within clues replaced further):
He [Brought to [Full growth]] the [[Educated guess]] of [Family [Link]].
Each example records the sentence at every nesting level, from the plain original to the maximally nested version.
Dataset Fields
| Field | Type | Description |
|---|---|---|
example_id |
int |
Unique example identifier |
source_article_title |
string |
Title of the Wikipedia article the sentence was sampled from |
original_sentence |
string |
The original unmodified sentence (level 0) |
levels |
list[string] |
The sentence at each nesting depth. levels[0] is the original, levels[k] has k layers of [bracketed clue] nesting |
max_nesting_depth |
int |
The deepest nesting level achieved for this example |
num_replacements_per_level |
list[int] |
Number of word-to-clue replacements made at each depth level |
Construction
The dataset is built in four phases:
Clue Index: A lookup table is built from the CrosswordQA train split (~6.4M clue-answer pairs), mapping lowercase answers (up to 2 words) to their corresponding clue strings.
Sentence Sampling: Sentences are sampled from English Wikipedia (November 2023 snapshot) via streaming and reservoir sampling. Sentences are filtered to 5–25 words, must end with sentence-ending punctuation, and must be free of wiki markup artifacts.
Recursive Nesting: For each sentence, content words are replaced with randomly chosen crossword clues from the index. The replacement is then applied recursively to words within the clues themselves, building a tree of nested definitions up to a maximum depth of 10. A max-gap constraint ensures definitions are densely distributed — if too many consecutive words go unreplaced, replacement is forced or the example is dropped.
Anti-cycle Protection: A set of already-replaced words is tracked across all nesting levels. Clues containing previously replaced words are rejected to prevent circular definitions.
Filters and Design Choices
- Stopwords skipped: Common English function words (articles, prepositions, pronouns, auxiliaries) are left unreplaced to maintain readability.
- Bigram matching: Two-word answers from CrosswordQA are matched greedily before single words.
- Max-gap constraint: At the sentence level (depth 1), if 3+ consecutive content words go unreplaced, the next replacement is forced. If no valid clue exists, the entire example is dropped and a new sentence is sampled.
- Min answer length: Answers shorter than 3 characters are excluded from the index.
- Max clue length: Clues longer than 80 characters are excluded.
- No brackets in clues: Clues containing
[,],(,),{,}are excluded to avoid ambiguity with the nesting notation.
Source Datasets
- CrosswordQA — 6.4M crossword clue-answer pairs (train split)
- English Wikipedia — November 2023 snapshot (
20231101.enconfig)
Generation Script
The dataset was generated using scripts/build_nested_clues.py from the rebus-reasoning repository.
python scripts/build_nested_clues.py \
--num-examples 100000 \
--max-depth 10 \
--seed 42 \
--max-answer-words 2 \
--max-gap 3 \
--replacement-prob 0.8 \
--articles-to-scan 50000 \
--save-index output/clue_index.json \
--output output/nested_clues.json
License
Apache 2.0
- Downloads last month
- 5