caiopizzol commited on
Commit
6787941
·
verified ·
1 Parent(s): fe131ba

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +94 -0
README.md ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: odc-by
3
+ task_categories:
4
+ - text-classification
5
+ language:
6
+ - en
7
+ - ru
8
+ - cs
9
+ - pl
10
+ - es
11
+ - zh
12
+ - lt
13
+ - sk
14
+ - fr
15
+ - pt
16
+ - de
17
+ - it
18
+ - sv
19
+ - nl
20
+ - bg
21
+ - uk
22
+ - tr
23
+ - ja
24
+ - hu
25
+ - ko
26
+ size_categories:
27
+ - 100K<n<1M
28
+ tags:
29
+ - docx
30
+ - word-documents
31
+ - document-classification
32
+ - ooxml
33
+ pretty_name: docx-corpus
34
+ ---
35
+
36
+ # docx-corpus
37
+
38
+ The largest classified corpus of Word documents. 736K+ `.docx` files from the public web, classified into 10 document types and 9 topics across 76 languages.
39
+
40
+ ## Dataset Description
41
+
42
+ This dataset contains metadata for publicly available `.docx` files collected from the web. Each document has been classified by document type and topic using a two-stage pipeline: LLM labeling (Claude) of a stratified sample, followed by fine-tuned XLM-RoBERTa classifiers applied at scale.
43
+
44
+ ### Schema
45
+
46
+ | Column | Type | Description |
47
+ |--------|------|-------------|
48
+ | `id` | string | SHA-256 hash of the file (unique identifier) |
49
+ | `filename` | string | Original filename from the source URL |
50
+ | `type` | string | Document type (10 classes) |
51
+ | `topic` | string | Document topic (9 classes) |
52
+ | `language` | string | Detected language (ISO 639-1 code) |
53
+ | `word_count` | int | Number of words in the document |
54
+ | `confidence` | float | Classification confidence (min of type and topic) |
55
+ | `url` | string | Direct download URL for the `.docx` file |
56
+
57
+ ### Document Types
58
+
59
+ legal, forms, reports, policies, educational, correspondence, technical, administrative, creative, reference
60
+
61
+ ### Topics
62
+
63
+ government, education, healthcare, finance, legal_judicial, technology, environment, nonprofit, general
64
+
65
+ ## Download Files
66
+
67
+ Each row includes a `url` column pointing to the `.docx` file on our CDN. You can download files directly:
68
+
69
+ ```python
70
+ from datasets import load_dataset
71
+ import requests
72
+
73
+ ds = load_dataset("superdoc-dev/docx-corpus", split="train")
74
+
75
+ # Filter and download
76
+ legal_en = ds.filter(lambda x: x["type"] == "legal" and x["language"] == "en")
77
+ for row in legal_en:
78
+ resp = requests.get(row["url"])
79
+ with open(f"corpus/{row['id']}.docx", "wb") as f:
80
+ f.write(resp.content)
81
+ ```
82
+
83
+ Or use the manifest API for bulk downloads:
84
+
85
+ ```bash
86
+ curl "https://api.docxcorp.us/manifest?type=legal&lang=en" -o manifest.txt
87
+ wget -i manifest.txt -P ./corpus/
88
+ ```
89
+
90
+ ## Links
91
+
92
+ - **Website**: [docxcorp.us](https://docxcorp.us)
93
+ - **GitHub**: [superdoc-dev/docx-corpus](https://github.com/superdoc-dev/docx-corpus)
94
+ - **Built by**: [SuperDoc](https://superdoc.dev)