Update README.md
Browse files
README.md
CHANGED
|
@@ -8,6 +8,8 @@ language:
|
|
| 8 |
tags:
|
| 9 |
- pdf
|
| 10 |
- ocr
|
|
|
|
|
|
|
| 11 |
size_categories:
|
| 12 |
- 100K<n<1M
|
| 13 |
---
|
|
@@ -15,7 +17,7 @@ size_categories:
|
|
| 15 |
# govdocs1: source PDF files
|
| 16 |
|
| 17 |
|
| 18 |
-
This is ~220,000 open-access PDF documents from the dataset [govdocs1](https://digitalcorpora.org/corpora/file-corpora/files/)
|
| 19 |
|
| 20 |
|
| 21 |
## Recovering the data
|
|
@@ -24,4 +26,128 @@ Download the `data/` directory (with `huggingface-cli download` or similar) extr
|
|
| 24 |
|
| 25 |
```sh
|
| 26 |
cat data_pdfs_part.tar.* | tar -xf - && rm data_pdfs_part.tar.*
|
| 27 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
tags:
|
| 9 |
- pdf
|
| 10 |
- ocr
|
| 11 |
+
- legal
|
| 12 |
+
- government
|
| 13 |
size_categories:
|
| 14 |
- 100K<n<1M
|
| 15 |
---
|
|
|
|
| 17 |
# govdocs1: source PDF files
|
| 18 |
|
| 19 |
|
| 20 |
+
This is ~220,000 open-access PDF documents from the dataset [govdocs1](https://digitalcorpora.org/corpora/file-corpora/files/). It wants to be OCR'd.
|
| 21 |
|
| 22 |
|
| 23 |
## Recovering the data
|
|
|
|
| 26 |
|
| 27 |
```sh
|
| 28 |
cat data_pdfs_part.tar.* | tar -xf - && rm data_pdfs_part.tar.*
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
## GovDocs1 PDF Dataset Analysis
|
| 32 |
+
|
| 33 |
+
Based on the [index.csv](data/index.csv)
|
| 34 |
+
|
| 35 |
+
### Dataset Overview
|
| 36 |
+
|
| 37 |
+
| Metric | Value | Percentage |
|
| 38 |
+
|--------|-------|------------|
|
| 39 |
+
| Total Documents | 229,917 | 100% |
|
| 40 |
+
| Successfully Processed | 229,824 | 99.96% |
|
| 41 |
+
| Broken/Corrupted | 93 | 0.04% |
|
| 42 |
+
| Unique Filenames | 229,917 | 100% |
|
| 43 |
+
|
| 44 |
+
### Document Structure
|
| 45 |
+
|
| 46 |
+
#### Page Count Distribution
|
| 47 |
+
|
| 48 |
+
| Pages | Count | Percentage |
|
| 49 |
+
|-------|-------|------------|
|
| 50 |
+
| 2 pages | 21,887 | 9.5% |
|
| 51 |
+
| 1 page | 19,282 | 8.4% |
|
| 52 |
+
| 4 pages | 14,640 | 6.4% |
|
| 53 |
+
| 3 pages | 12,861 | 5.6% |
|
| 54 |
+
| 6 pages | 9,770 | 4.3% |
|
| 55 |
+
|
| 56 |
+
| Statistic | Value |
|
| 57 |
+
|-----------|-------|
|
| 58 |
+
| **Range** | 1 - 3,200 pages |
|
| 59 |
+
| **Mean** | 27.8 pages |
|
| 60 |
+
| **Median** | 10 pages |
|
| 61 |
+
| **Standard Deviation** | 67.9 pages |
|
| 62 |
+
|
| 63 |
+
#### File Size Distribution
|
| 64 |
+
|
| 65 |
+
| Size (MB) | Count | Percentage |
|
| 66 |
+
|-----------|-------|------------|
|
| 67 |
+
| 0.02 | 13,427 | 5.8% |
|
| 68 |
+
| 0.03 | 12,142 | 5.3% |
|
| 69 |
+
| 0.04 | 12,085 | 5.3% |
|
| 70 |
+
| 0.05 | 11,850 | 5.2% |
|
| 71 |
+
| 0.01 | 9,929 | 4.3% |
|
| 72 |
+
|
| 73 |
+
| Statistic | Value |
|
| 74 |
+
|-----------|-------|
|
| 75 |
+
| **Range** | 0 - 68.83 MB |
|
| 76 |
+
| **Mean** | 0.565 MB |
|
| 77 |
+
| **Median** | 0.15 MB |
|
| 78 |
+
| **Standard Deviation** | 1.134 MB |
|
| 79 |
+
|
| 80 |
+
### Metadata Completeness Crisis
|
| 81 |
+
|
| 82 |
+
| Field | Missing | Present | Completeness |
|
| 83 |
+
|-------|---------|---------|--------------|
|
| 84 |
+
| **Subject** | 182,430 | 47,487 | **20.6%** |
|
| 85 |
+
| **Author** | 78,269 | 151,648 | **66.0%** |
|
| 86 |
+
| **Title** | 51,514 | 178,403 | **77.6%** |
|
| 87 |
+
| **Created Date** | 3,260 | 226,657 | **98.6%** |
|
| 88 |
+
|
| 89 |
+
#### Title Quality Breakdown
|
| 90 |
+
|
| 91 |
+
| Title Type | Count | Percentage |
|
| 92 |
+
|------------|-------|------------|
|
| 93 |
+
| Missing (None) | 51,514 | 22.4% |
|
| 94 |
+
| Generic "Document" | 11,699 | 5.1% |
|
| 95 |
+
| "untitled" | 2,081 | 0.9% |
|
| 96 |
+
| Meaningful titles | ~165,000 | 71.6% |
|
| 97 |
+
|
| 98 |
+
#### Top Authors
|
| 99 |
+
|
| 100 |
+
| Author | Count |
|
| 101 |
+
|--------|-------|
|
| 102 |
+
| U.S. Government Printing Office | 11,838 |
|
| 103 |
+
| Unknown | 3,477 |
|
| 104 |
+
| Administrator | 1,630 |
|
| 105 |
+
| U.S. Government Accountability Office | 1,390 |
|
| 106 |
+
|
| 107 |
+
#### Top Subjects
|
| 108 |
+
|
| 109 |
+
| Subject | Count |
|
| 110 |
+
|---------|-------|
|
| 111 |
+
| Extracted Pages | 11,692 |
|
| 112 |
+
| NIOSH HHE REPORT | 466 |
|
| 113 |
+
| CMS Opinion Template | 353 |
|
| 114 |
+
| SEC Financial Proposals Summary | 230 |
|
| 115 |
+
|
| 116 |
+
### Processing Errors
|
| 117 |
+
|
| 118 |
+
| Error Type | Count | Percentage |
|
| 119 |
+
|------------|-------|------------|
|
| 120 |
+
| Could not read Boolean object | 46 | 49.5% |
|
| 121 |
+
| cryptography>=3.1 required for AES | 15 | 16.1% |
|
| 122 |
+
| Stream ended unexpectedly | 9 | 9.7% |
|
| 123 |
+
| 'NullObject' has no attribute 'get' | 5 | 5.4% |
|
| 124 |
+
| Other errors | 18 | 19.4% |
|
| 125 |
+
|
| 126 |
+
### Temporal Coverage
|
| 127 |
+
|
| 128 |
+
| Date Field | Range | Issues |
|
| 129 |
+
|------------|-------|--------|
|
| 130 |
+
| **Modified Date** | 1979-12-31 to 2025-03-31 | Future dates present |
|
| 131 |
+
| **Created Date** | Various formats | 1,573 invalid "D:00000101000000Z" |
|
| 132 |
+
|
| 133 |
+
### Critical Assessment
|
| 134 |
+
|
| 135 |
+
> [!NOTE]
|
| 136 |
+
> Generated by Claude Sonnet-4, unsolicited (_as always_)
|
| 137 |
+
|
| 138 |
+
#### Data Quality Issues
|
| 139 |
+
|
| 140 |
+
| Issue | Severity | Impact |
|
| 141 |
+
|-------|----------|---------|
|
| 142 |
+
| **Metadata Poverty** | **CRITICAL** | 79% missing subjects kills discoverability |
|
| 143 |
+
| **Title Degradation** | **HIGH** | 28% generic/missing titles |
|
| 144 |
+
| **Date Inconsistencies** | **MEDIUM** | Invalid formats, future dates |
|
| 145 |
+
| **Processing Errors** | **LOW** | 0.04% failure rate acceptable |
|
| 146 |
+
|
| 147 |
+
#### Key Insights
|
| 148 |
+
|
| 149 |
+
**Document Profile**: Typical government PDF = 10 pages, 0.15 MB, metadata-poor
|
| 150 |
+
|
| 151 |
+
**Fatal Flaw**: This dataset has excellent technical extraction (99.96% success) but catastrophic intellectual organization. You're essentially working with 230K unlabeled documents.
|
| 152 |
+
|
| 153 |
+
**Bottom Line**: The structural data is solid, but without subject classification for 79% of documents, this is an unindexed digital landfill masquerading as an archive.
|