File size: 2,195 Bytes
fd65c57
40f45f7
 
 
 
 
fd65c57
40f45f7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
tags:
  - statistics
  - polars
  - finepdfs-edu
license: odc-by
---

# Statistics for HuggingFaceFW/finepdfs-edu (Dutch (Latin script))

Aggregate statistics computed using Polars streaming on the [HuggingFaceFW/finepdfs-edu](https://huggingface.co/datasets/HuggingFaceFW/finepdfs-edu) dataset.

## Performance

Processed **847,361 documents** in **125.88 seconds**.

| Step | Time |
|------|------|
| Global stats | 34.19s |
| Language stats | 31.81s |
| Extractor stats | 29.46s |
| Dump stats | 30.42s |
| **Total** | **125.88s** |

> Speed comes from Polars only reading metadata columns (not the `text` column),
> thanks to Parquet's columnar format and lazy evaluation.

## How This Was Generated

This dataset demonstrates **Polars streaming aggregation** with HuggingFace Hub integration.
Thanks to [polars#25521](https://github.com/pola-rs/polars/pull/25521), `scan_parquet`
with `hf://` paths now uses far fewer API calls (139 → 1 for finepdfs-edu).

```bash
uv run polars-hf-stats.py --lang nld_Latn --output-repo davanstrien/finepdfs-nld-stats
```

## Global Summary

| Metric | Value |
|--------|-------|
| Language | Dutch (Latin script) (`nld_Latn`) |
| Total Documents | 847,361 |
| Total Tokens | 5,424,871,452 |
| Average Tokens/Doc | 6,402 |
| Truncated Documents | 207,376 (24.5%) |
| Unique Languages | 1 |
| Unique Extractors | 2 |
| Unique Dumps | 106 |

## Configs

- `global_stats` - Overall summary (1 row)
- `language_stats` - Per-language aggregations
- `extractor_stats` - Per-extractor aggregations
- `dump_stats` - Per-dump aggregations

## Usage

```python
from datasets import load_dataset

# Load all configs
global_stats = load_dataset("davanstrien/finepdfs-nld-stats", "global_stats")
lang_stats = load_dataset("davanstrien/finepdfs-nld-stats", "language_stats")
extractor_stats = load_dataset("davanstrien/finepdfs-nld-stats", "extractor_stats")
dump_stats = load_dataset("davanstrien/finepdfs-nld-stats", "dump_stats")
```

## Source

- **Dataset**: [HuggingFaceFW/finepdfs-edu](https://huggingface.co/datasets/HuggingFaceFW/finepdfs-edu)
- **Language**: nld_Latn
- **Script**: [polars-hf-stats.py](https://huggingface.co/datasets/uv-scripts/polars)