dedoc/paragraph_classifier
Updated
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 145, in _generate_tables dataset = json.load(f) File "/usr/local/lib/python3.9/json/__init__.py", line 293, in load return loads(fp.read(), File "/usr/local/lib/python3.9/json/__init__.py", line 346, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/lib/python3.9/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) 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 240, 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 2216, 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 1239, in _head return _examples_to_batch(list(self.take(n))) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 1389, in __iter__ for key, example in ex_iterable: File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 1044, in __iter__ yield from islice(self.ex_iterable, self.n) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/iterable_dataset.py", line 282, in __iter__ for key, pa_table in self.generate_tables_fn(**self.kwargs): File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 148, in _generate_tables raise e File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 122, 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 0
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Dataset for a lines classifier that predicts the beginning of a new paragraph (see paragraph classifier).
The repository structure:
└─paragraph_dataset
├─labeling
├─paragraph_classifier_834997.zip
└─results
├─law_classifier_000000_AKs.json
├─ ...
└─law_classifier_000049_d9X.json
├─.gitattributes
├─README.md
└─paragraph_dataset.zip
labeling
directory contains tasks for labeling (paragraph_classifier_834997.zip
) and labeled lines (results
directory).
paragraph_dataset.zip
contains files with the resilting dataset.
Tasks for labeling are formed using dedoc labeling API. See dedoc documentation for more details.
The structure of the paragraph_dataset.zip
archive after unzipping goes as follows:
└─paragraph_dataset
└─labeled.json
├─parameters.json
├─task_manager.log
└─original_documents
├─1709714642_887.png
├─ ...
└─1709714823_806.pdf
labeled.json
contains lines with their labels. For each line, line's text, metadata and formatting are extracted by dedoc.parameters.json
contains dedoc
parameters using which lines were extracted.task_manager.log
contains logs from labeling process.original_documents
folder contains documets from which lines were extracted.