Divyanshudiv commited on
Commit
bc2c223
·
verified ·
1 Parent(s): 66f9040

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +150 -3
README.md CHANGED
@@ -1,3 +1,150 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Wikipedia Culture Dataset (`nDNA/WikiCulture`)
2
+
3
+ ## Overview
4
+
5
+ This dataset provides coarse-grained geographic culture labels for English Wikipedia articles, mapped into eight buckets:
6
+
7
+ * **NA**: North America
8
+ * **EU**: Europe
9
+ * **AU**: Oceania (UN M49 “Oceania”)
10
+ * **AS**: Asia (excluding Western Asia and Greater China)
11
+ * **CH**: Greater China (CN, HK, MO, TW)
12
+ * **AF**: Africa
13
+ * **LA**: Latin America & Caribbean (Americas excluding Northern America)
14
+ * **ME**: Middle East (UN M49 “Western Asia”)
15
+
16
+ The labels are intended for controlled sampling and stratified analysis of Wikipedia content by broad region. They are not intended as fine-grained cultural or ethnographic ground truth.
17
+
18
+ ## Data Sources
19
+
20
+ The dataset is constructed from three public components:
21
+
22
+ 1. **UN M49** country/area regional classification (UN Statistics Division), used to generate a deterministic mapping from ISO3166-1 alpha-2 codes to the eight buckets.
23
+ 2. **Wikipedia Cultural Diversity** dataset, used as the article-level signal source (including per-article ISO country code and Wikidata-derived fields) [https://doi.org/10.6084/m9.figshare.7039514].
24
+ 3. **`wikimedia/wikipedia` (Hugging Face dataset)**, used to attach the full article text via a join.
25
+
26
+ ## Labeling Methodology
27
+
28
+ ### 1) Deterministic ISO2 → bucket mapping (UN M49)
29
+
30
+ An ISO3166-1 alpha-2 code is mapped to one of the eight buckets using UN M49 region/subregion fields:
31
+
32
+ * **EU** if UN M49 Region = *Europe*
33
+ * **AF** if Region = *Africa*
34
+ * **AU** if Region = *Oceania*
35
+ * **ME** if Sub-region = *Western Asia*
36
+ * **NA** if Region = *Americas* and Sub-region = *Northern America*
37
+ * **LA** if Region = *Americas* and not Northern America
38
+ * **CH** if ISO2 ∈ {CN, HK, MO, TW} (Taiwan forced to CH)
39
+ * **AS** if Region = *Asia* and not Western Asia and not CH
40
+
41
+ This mapping is deterministic and versioned.
42
+
43
+ ### 2) Geo label assignment from CCC
44
+
45
+ Each article in the CCC dump provides `iso3166` (ISO3166-1 alpha-2). The primary label is:
46
+
47
+ **culture_geo = bucket(iso3166)**
48
+
49
+ Rows with missing `iso3166` or unmapped ISO2 are excluded.
50
+
51
+ ### 3) High-precision consistency filtering
52
+
53
+ To increase label precision and remove cross-regional or ambiguous items, an additional consistency check is applied using CCC’s Wikidata-derived columns:
54
+
55
+ * `country_wd`
56
+ * `location_wd`
57
+
58
+ **Offline QID → ISO2 bootstrap.**
59
+ Because no online Wikidata queries are used, we construct a bootstrapped mapping from QID to ISO2 by taking the most frequent `iso3166` observed for each `qitem` in the CCC dump.
60
+
61
+ **Evidence extraction.**
62
+ For each article, QIDs are parsed from `country_wd` and `location_wd`, mapped to ISO2 using the bootstrapped table, then converted to bucket sets via the UN M49 mapping.
63
+
64
+ **Hard-strong inclusion rule.**
65
+ An article is retained as *high-precision* if:
66
+
67
+ * It has at least one non-empty evidence set from `country_wd` or `location_wd`, and
68
+ * If `location_wd` evidence is present, it must equal `{culture_geo}` exactly; otherwise,
69
+ * `country_wd` evidence must equal `{culture_geo}` exactly.
70
+
71
+ This rule is deliberately discard-heavy.
72
+
73
+ ### 4) Middle East retention exception
74
+
75
+ In the CCC snapshot used, many ME-labeled rows have empty evidence after offline QID resolution (coverage limitations of the bootstrapped mapping). To avoid eliminating nearly all ME-labeled examples, a restricted exception is applied:
76
+
77
+ * If `culture_geo == "ME"` and both evidence sets are empty, the row is retained (geo-only).
78
+
79
+ ## Attaching Wikipedia Text (`wikimedia/wikipedia` join)
80
+
81
+ The final dataset includes the full article text by merging the filtered labeled table with the Hugging Face dataset **`wikimedia/wikipedia`**.
82
+
83
+ * A **left inner join** is performed on the article identifier:
84
+
85
+ * CCC / labeled table: `page_id`
86
+ * `wikimedia/wikipedia`: `id`
87
+
88
+ Only rows that match across both sources are included in the released dataset, ensuring every labeled example has associated article text.
89
+
90
+ ## Dataset Fields
91
+
92
+ Each row contains:
93
+
94
+ * `page_title` (string): Wikipedia article title (from CCC / Wikipedia metadata)
95
+ * `Qid` (string): Wikidata QID (`qitem`)
96
+ * `culture_geo` (string): one of `{NA, EU, AU, AS, CH, AF, LA, ME}`
97
+ * `text` (string): The article text (from `wikimedia/wikipedia`)
98
+
99
+ ## Intended Use
100
+
101
+ This dataset is suitable for:
102
+
103
+ * constructing geographically stratified Wikipedia subsets,
104
+ * controlled pretraining mixtures or evaluation subsets by region,
105
+ * studying representation and performance disparities across broad regions.
106
+
107
+ It is not suitable for:
108
+
109
+ * fine-grained cultural identity claims,
110
+ * country-level ground truth without additional validation,
111
+ * resolving inherently transnational or multi-regional topics (which are preferentially excluded by design).
112
+
113
+ ## Limitations
114
+
115
+ * Labels are coarse and operationalize “culture” as broad geography.
116
+ * The strict filter excludes many global and transnational pages.
117
+ * The offline QID→ISO2 bootstrap is a heuristic and may miss QIDs not well-represented in the CCC rows.
118
+ * The Middle East geo-only exception yields a subset with weaker evidence than the hard-strong subset, but is retained to mitigate coverage loss under offline constraints.
119
+ * The final dataset includes only articles present in both the labeled CCC-derived table and `wikimedia/wikipedia` after the `page_id` ↔ `id` join.
120
+
121
+ ## Reproducibility
122
+
123
+ The pipeline is deterministic given:
124
+
125
+ * the UN M49 table snapshot used,
126
+ * the CCC dump snapshot used,
127
+ * the fixed mapping rules and filtering rule described above,
128
+ * the `wikimedia/wikipedia` snapshot/config used for the text join.
129
+
130
+ ## Licensing and Attribution
131
+
132
+ This dataset is derived from Wikipedia-related resources and UN statistical classifications. Users should comply with the licensing and attribution requirements of:
133
+
134
+ * Wikipedia content (CC BY-SA and related terms),
135
+ * the CCC dataset’s licensing/terms,
136
+ * UN M49 documentation and terms where applicable.
137
+
138
+ ## Citation
139
+
140
+ If you use this dataset, cite:
141
+
142
+ * the CCC dataset (Wikipedia Cultural Diversity / Cultural Context Content) and associated publication,
143
+ * UN M49 (UN Statistics Division),
144
+ * the `wikimedia/wikipedia` Hugging Face dataset,
145
+ * this dataset repository (`nDNA/WikiCulture`).
146
+
147
+
148
+ ---
149
+ license: mit
150
+ ---