Datasets:
Tasks:
Question Answering
Modalities:
Text
Formats:
parquet
Sub-tasks:
closed-domain-qa
Languages:
English
Size:
10K - 100K
License:
| import tarfile | |
| from pathlib import Path | |
| script_dir = Path(__file__).resolve().parent | |
| scraped_files_root = "questions" | |
| def extract_articles() -> Path: | |
| articles = script_dir / scraped_files_root | |
| if not articles.is_dir(): | |
| articles_archive = script_dir / f"{scraped_files_root}.tar.xz" | |
| if not articles_archive.is_file(): | |
| raise RuntimeError(f"{scraped_files_root} directory / {scraped_files_root}.tar.xz archive not present in cwd") | |
| with tarfile.open(articles_archive, "r:*") as tar: | |
| tar.extractall() | |
| articles = script_dir / scraped_files_root | |
| if not articles.is_dir(): | |
| raise RuntimeError(f"tarfile extraction failed to produce {scraped_files_root} directory") | |
| return articles | |