Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,118 +1,74 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
-
|
| 4 |
-
|
| 5 |
-
-
|
| 6 |
-
|
| 7 |
-
- name: doc_count
|
| 8 |
-
dtype: uint32
|
| 9 |
-
- name: total_tokens
|
| 10 |
-
dtype: int64
|
| 11 |
-
- name: avg_tokens
|
| 12 |
-
dtype: float64
|
| 13 |
-
splits:
|
| 14 |
-
- name: train
|
| 15 |
-
num_bytes: 4558
|
| 16 |
-
num_examples: 106
|
| 17 |
-
download_size: 5114
|
| 18 |
-
dataset_size: 4558
|
| 19 |
-
- config_name: extractor_stats
|
| 20 |
-
features:
|
| 21 |
-
- name: extractor
|
| 22 |
-
dtype: large_string
|
| 23 |
-
- name: doc_count
|
| 24 |
-
dtype: uint32
|
| 25 |
-
- name: total_tokens
|
| 26 |
-
dtype: int64
|
| 27 |
-
- name: avg_tokens
|
| 28 |
-
dtype: float64
|
| 29 |
-
- name: truncated_count
|
| 30 |
-
dtype: uint32
|
| 31 |
-
- name: avg_lid_score
|
| 32 |
-
dtype: float64
|
| 33 |
-
splits:
|
| 34 |
-
- name: train
|
| 35 |
-
num_bytes: 96
|
| 36 |
-
num_examples: 2
|
| 37 |
-
download_size: 3103
|
| 38 |
-
dataset_size: 96
|
| 39 |
-
- config_name: global_stats
|
| 40 |
-
features:
|
| 41 |
-
- name: total_docs
|
| 42 |
-
dtype: uint32
|
| 43 |
-
- name: total_tokens
|
| 44 |
-
dtype: int64
|
| 45 |
-
- name: avg_tokens
|
| 46 |
-
dtype: float64
|
| 47 |
-
- name: median_tokens
|
| 48 |
-
dtype: float64
|
| 49 |
-
- name: std_tokens
|
| 50 |
-
dtype: float64
|
| 51 |
-
- name: truncated_docs
|
| 52 |
-
dtype: uint32
|
| 53 |
-
- name: truncation_rate
|
| 54 |
-
dtype: float64
|
| 55 |
-
- name: avg_cluster_size
|
| 56 |
-
dtype: float64
|
| 57 |
-
- name: total_duplicates
|
| 58 |
-
dtype: int64
|
| 59 |
-
- name: unique_languages
|
| 60 |
-
dtype: uint32
|
| 61 |
-
- name: unique_extractors
|
| 62 |
-
dtype: uint32
|
| 63 |
-
- name: unique_dumps
|
| 64 |
-
dtype: uint32
|
| 65 |
-
splits:
|
| 66 |
-
- name: train
|
| 67 |
-
num_bytes: 76
|
| 68 |
-
num_examples: 1
|
| 69 |
-
download_size: 5750
|
| 70 |
-
dataset_size: 76
|
| 71 |
-
- config_name: language_stats
|
| 72 |
-
features:
|
| 73 |
-
- name: language
|
| 74 |
-
dtype: large_string
|
| 75 |
-
- name: doc_count
|
| 76 |
-
dtype: uint32
|
| 77 |
-
- name: total_tokens
|
| 78 |
-
dtype: int64
|
| 79 |
-
- name: avg_tokens
|
| 80 |
-
dtype: float64
|
| 81 |
-
- name: median_tokens
|
| 82 |
-
dtype: float64
|
| 83 |
-
- name: min_tokens
|
| 84 |
-
dtype: int64
|
| 85 |
-
- name: max_tokens
|
| 86 |
-
dtype: int64
|
| 87 |
-
- name: avg_lid_score
|
| 88 |
-
dtype: float64
|
| 89 |
-
- name: truncated_count
|
| 90 |
-
dtype: uint32
|
| 91 |
-
- name: avg_cluster_size
|
| 92 |
-
dtype: float64
|
| 93 |
-
- name: total_duplicates
|
| 94 |
-
dtype: int64
|
| 95 |
-
splits:
|
| 96 |
-
- name: train
|
| 97 |
-
num_bytes: 88
|
| 98 |
-
num_examples: 1
|
| 99 |
-
download_size: 5314
|
| 100 |
-
dataset_size: 88
|
| 101 |
-
configs:
|
| 102 |
-
- config_name: dump_stats
|
| 103 |
-
data_files:
|
| 104 |
-
- split: train
|
| 105 |
-
path: dump_stats/train-*
|
| 106 |
-
- config_name: extractor_stats
|
| 107 |
-
data_files:
|
| 108 |
-
- split: train
|
| 109 |
-
path: extractor_stats/train-*
|
| 110 |
-
- config_name: global_stats
|
| 111 |
-
data_files:
|
| 112 |
-
- split: train
|
| 113 |
-
path: global_stats/train-*
|
| 114 |
-
- config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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
---
|
| 8 |
+
|
| 9 |
+
# Statistics for HuggingFaceFW/finepdfs-edu (Dutch (Latin script))
|
| 10 |
+
|
| 11 |
+
Aggregate statistics computed using Polars streaming on the [HuggingFaceFW/finepdfs-edu](https://huggingface.co/datasets/HuggingFaceFW/finepdfs-edu) dataset.
|
| 12 |
+
|
| 13 |
+
## Performance
|
| 14 |
+
|
| 15 |
+
Processed **847,361 documents** in **125.88 seconds**.
|
| 16 |
+
|
| 17 |
+
| Step | Time |
|
| 18 |
+
|------|------|
|
| 19 |
+
| Global stats | 34.19s |
|
| 20 |
+
| Language stats | 31.81s |
|
| 21 |
+
| Extractor stats | 29.46s |
|
| 22 |
+
| Dump stats | 30.42s |
|
| 23 |
+
| **Total** | **125.88s** |
|
| 24 |
+
|
| 25 |
+
> Speed comes from Polars only reading metadata columns (not the `text` column),
|
| 26 |
+
> thanks to Parquet's columnar format and lazy evaluation.
|
| 27 |
+
|
| 28 |
+
## How This Was Generated
|
| 29 |
+
|
| 30 |
+
This dataset demonstrates **Polars streaming aggregation** with HuggingFace Hub integration.
|
| 31 |
+
Thanks to [polars#25521](https://github.com/pola-rs/polars/pull/25521), `scan_parquet`
|
| 32 |
+
with `hf://` paths now uses far fewer API calls (139 → 1 for finepdfs-edu).
|
| 33 |
+
|
| 34 |
+
```bash
|
| 35 |
+
uv run polars-hf-stats.py --lang nld_Latn --output-repo davanstrien/finepdfs-nld-stats
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
## Global Summary
|
| 39 |
+
|
| 40 |
+
| Metric | Value |
|
| 41 |
+
|--------|-------|
|
| 42 |
+
| Language | Dutch (Latin script) (`nld_Latn`) |
|
| 43 |
+
| Total Documents | 847,361 |
|
| 44 |
+
| Total Tokens | 5,424,871,452 |
|
| 45 |
+
| Average Tokens/Doc | 6,402 |
|
| 46 |
+
| Truncated Documents | 207,376 (24.5%) |
|
| 47 |
+
| Unique Languages | 1 |
|
| 48 |
+
| Unique Extractors | 2 |
|
| 49 |
+
| Unique Dumps | 106 |
|
| 50 |
+
|
| 51 |
+
## Configs
|
| 52 |
+
|
| 53 |
+
- `global_stats` - Overall summary (1 row)
|
| 54 |
+
- `language_stats` - Per-language aggregations
|
| 55 |
+
- `extractor_stats` - Per-extractor aggregations
|
| 56 |
+
- `dump_stats` - Per-dump aggregations
|
| 57 |
+
|
| 58 |
+
## Usage
|
| 59 |
+
|
| 60 |
+
```python
|
| 61 |
+
from datasets import load_dataset
|
| 62 |
+
|
| 63 |
+
# Load all configs
|
| 64 |
+
global_stats = load_dataset("davanstrien/finepdfs-nld-stats", "global_stats")
|
| 65 |
+
lang_stats = load_dataset("davanstrien/finepdfs-nld-stats", "language_stats")
|
| 66 |
+
extractor_stats = load_dataset("davanstrien/finepdfs-nld-stats", "extractor_stats")
|
| 67 |
+
dump_stats = load_dataset("davanstrien/finepdfs-nld-stats", "dump_stats")
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
## Source
|
| 71 |
+
|
| 72 |
+
- **Dataset**: [HuggingFaceFW/finepdfs-edu](https://huggingface.co/datasets/HuggingFaceFW/finepdfs-edu)
|
| 73 |
+
- **Language**: nld_Latn
|
| 74 |
+
- **Script**: [polars-hf-stats.py](https://huggingface.co/datasets/uv-scripts/polars)
|