Battam's picture
apache-jira: update dataset card, docs and figures
bd9148f verified
|
Raw History Blame Contribute Delete
7.02 kB
# Fields
This page describes every file under `manifests/` and `catalog/`. The manifests are the source of truth. The tables under `catalog/` are a derived view: they are generated from `manifests/` each time a source is updated. Where the two differ, the manifests are right.
## Layout
- `manifests/<source>/<batch>/collection.json`: the header of one batch.
- `manifests/<source>/<batch>/part-NNNNN.jsonl.gz`: the pointers of the batch, as gzip-compressed JSON Lines with one line per file, numbered from `part-00000`.
- `catalog/<source>.parquet`: all pointers of one source as one flat table, read by the viewer on the dataset page.
A source whose batches are periods, such as the Common Crawl crawls or the Stack Exchange dumps, names each batch after its period, such as `2026-39` or `2024-06-30`, even when it has only one. Any other source with a single batch calls it `all`, and one with several batches names each after the volume the source gives it, such as `2024-06-30-revised`; batch names are lower case with hyphens.
## Pointer fields
Every line of a part file is one pointer with these fields:
- `schema_version`: version of the pointer format (`artifact-pointer-v0`).
- `pointer_id`: unique id of the pointer, `<source>:<collection>:<relative path>`.
- `source`: the source the pointer belongs to; also the name of the source's folders under `manifests/` and `catalog/`.
- `collection`: a group within the source. For sources whose batches are periods (such as the Stack Exchange dumps) it is the batch; otherwise it is a group the source defines, such as a project, a mailing list, a site or a term, and `notes` in `collection.json` usually says which.
- `uri`: where to download the file. `s3://` addresses usually have a public https address in `alt_uris`; `hf://datasets/<repo>@<revision>/<path>` stands for `https://huggingface.co/datasets/<repo>/resolve/<revision>/<path>`.
- `size_bytes`: size of the file in bytes, or `null` when the source does not publish it.
- `hashes`: hashes of the file (`md5`, `sha1`, `sha256`, `sha512`, `crc32`, `etag`, `git_blob_sha1`), lower-case hex; empty when the source publishes none.
- `hash_source`: where the hashes come from: `source_published` (published by the source), `http_head` (HTTP response headers), `name_convention` (part of the file name), `computed` (computed from the content when the catalog was built), `computed_on_fetch` (not available; compute them after download).
- `ext`: lower-case file extension, without the dot; empty when the file has none.
Optional fields:
- `alt_uris`: other addresses that serve the same bytes.
- `range`: `{offset, length}`; the file is that byte range of `uri`, for example one record inside a WARC file. `size_bytes` then equals `length`.
- `hash_scope`: what the hashes cover: `file` (the whole download; the default), `http_payload` or `api_body` (see [retrieval.md](retrieval.md)).
- `media_type`: MIME type given by the source.
- `content`: the content kinds of this file, when they differ from those of its batch (`content` in `collection.json`).
- `license_override`: the license of this file when it differs from its batch: `spdx` (SPDX id or expression), `training_ok`, `redistribution_ok`, and `notes` (the license as the source states it); see [licenses.md](licenses.md).
- `access`: whether downloading needs a login or a form (`needs_auth`), with a `note` where useful.
- `source_meta`: a flat object of facts from the source; `source_meta_keys` in `collection.json` explains its keys.
- `origin`: for web captures, the original URL (`url`) and capture time (`captured_at`).
- `capture_count`: for web captures, how many captures share this payload.
- `parent_pointer_id`, `member_path`: for a file inside an archive that has its own pointer.
## Batch header fields (`collection.json`)
Each batch folder has one `collection.json` with these fields:
- `schema_version`: version of the pointer format.
- `source`: the source name, as in the pointers and the folder names.
- `content`: the content kinds of the batch, such as `emails` or `spreadsheets`.
- `collector`: the name of the collector that generated the pointers.
- `title`, `description`: what the source is and what one pointer stands for.
- `files`, `bytes`: the number of pointers in the batch and the sum of their `size_bytes` (sizes that are not published count as 0).
- `by_ext`: files and bytes per extension; `(none)` stands for files without an extension.
- `by_collection`: files and bytes per value of the pointer field `collection`, when the collector counts them (empty otherwise).
- `hash_sources`: the number of pointers per `hash_source`.
- `license`: the license of the batch: `name`, `url`, `statement` (quoted from the source where possible), `attribution`, `per_file` (where licenses are given per file), and the tiers `training_ok` and `redistribution_ok`; see [licenses.md](licenses.md).
- `fetch`: how to retrieve and verify the files of this source: `method`, `verify` and `failures`; see [retrieval.md](retrieval.md).
- `shards`: the part files of the batch, in order: `name`, `rows` (pointers in the part), and the `bytes` and `sha256` of the `.gz` file as stored in this repository.
- `notes`: facts about the source and how its pointers were made, often including what the `collection` field stands for.
- `source_meta_keys`: what each key of `source_meta` in the pointers means.
- `text_version`: version of the descriptive text.
Some sources add keys of their own, such as `collection` (details of an upstream batch) or `by_site` (files and bytes per site); `notes` explains them.
## Catalog columns
Each row of `catalog/<source>.parquet` is one pointer, in the order of the batches and part files. The license columns are already resolved: the value from `license_override` when the pointer has one, otherwise the value of its batch.
- `source`, `collection`: as in the pointers.
- `batch`: the batch the pointer belongs to, the folder name under `manifests/<source>/`; filter on it to see one batch.
- `content`: the kind of content of the file; several kinds are separated by a comma.
- `ext`: lower-case file extension.
- `size`: the size in KB, MB, GB or TB; `size_bytes`: the size in bytes, or empty when the source does not publish it.
- `training_ok`, `redistribution_ok`: the license tiers of this file; `license`: its license.
- `uri`: where to download the file; `alt_uris`: other addresses that serve the same bytes.
- `pointer_id`: unique id of the pointer, `<source>:<collection>:<relative path>`.
- `sha256`, `md5`, `sha1`: hashes published for the file, when available; other hashes are in the pointers; `hash_source`: where they come from.
- `media_type`: MIME type given by the source.
- `needs_auth`: whether downloading needs a login or a form (empty when not known).
- `has_range`: whether the file is a byte range of `uri` (see `range` in the pointers).
- `source_meta`: facts from the source, as JSON text; `source_meta_keys` in `collection.json` explains its keys.