cterdam commited on
Commit
44fa80b
·
verified ·
1 Parent(s): 5dcd385

Update metadata - hash field added

Browse files
Files changed (1) hide show
  1. README.md +9 -94
README.md CHANGED
@@ -1,48 +1,9 @@
1
  ---
2
  tags:
3
- - name
4
- - lang
5
- - hash
6
- - iso-3166
7
- dataset_info:
8
- features:
9
- - name: code
10
- dtype: string
11
- - name: status
12
- dtype: string
13
- - name: name_en
14
- dtype: string
15
- - name: name_ru
16
- dtype: string
17
- - name: name_zh
18
- dtype: string
19
- - name: names_en_alt
20
- list: string
21
- - name: names_ru_alt
22
- list: string
23
- - name: names_zh_alt
24
- list: string
25
- - name: names_other
26
- list: string
27
- - name: links
28
- list: string
29
- - name: note
30
- dtype: string
31
- - name: lang
32
- dtype: string
33
- - name: name
34
- dtype: string
35
- splits:
36
- - name: train
37
- num_bytes: 157315
38
- num_examples: 676
39
- download_size: 123433
40
- dataset_size: 157315
41
- configs:
42
- - config_name: default
43
- data_files:
44
- - split: train
45
- path: data/train-*
46
  ---
47
 
48
  # ISO 3166-1 Alpha-2 Codes with Lang and Hash
@@ -51,55 +12,9 @@ Country/region codes with language selection and deterministic hashing.
51
 
52
  ## Fields
53
 
54
- - **code** (string): ISO 3166-1 alpha-2 country code (e.g., 'US', 'RU', 'CN')
55
- - **status** (string): Official status (official, deprecated, etc.)
56
- - **name** (string): Primary name in selected language (en, ru, or zh)
57
- - **name_en** (string): English name
58
- - **name_ru** (string): Russian name
59
- - **name_zh** (string): Chinese name
60
- - **lang** (string): Language of primary name field (en, ru, or zh)
61
- - Determined by region: Slavic regions → ru, Sinophone regions → zh, rest → en
62
- - **hash** (string): SHA256 hash of `name` field (64 hex chars)
63
- - Used for sharding and collision detection
64
- - Deterministic: same name always produces same hash
65
- - **names_en_alt** (list): Alternative English names
66
- - **names_ru_alt** (list): Alternative Russian names
67
- - **names_zh_alt** (list): Alternative Chinese names
68
- - **names_other** (list): Names in other languages
69
- - **links** (list): Reference links
70
- - **note** (string): Additional notes
71
 
72
- ## Language Rule
73
-
74
- Languages are determined by hardcoded region mapping:
75
- - **Slavic (lang: ru)**: RU, UA, BY, KZ, UZ, TJ, KG, TM, GE, AZ, AM, MD, LT, LV, EE, RS, ME, BA, HR, SI, SK, CZ, PL, BG, MK, FI
76
- - **Sinophone (lang: zh)**: CN, TW, HK, MO, JP, KR, KP, MN, SG, VN, LA, TH, MM, KH, MY, BN
77
- - **Default (lang: en)**: All other regions
78
-
79
- ## Hash Field
80
-
81
- The `hash` field is the SHA256 hash of the `name` field:
82
- - Format: 64-character hexadecimal string
83
- - Deterministic: same name always produces same hash
84
- - Used for entry sharding in doc repositories (first 6 hex chars = shard ID)
85
- - Enables collision detection
86
-
87
- ## Usage
88
-
89
- ```python
90
- from datasets import load_dataset
91
-
92
- ds = load_dataset('cterdam/iso_3166-1_alpha-2', split='train')
93
- print(ds[0])
94
- # {
95
- # 'code': 'AD',
96
- # 'name': 'Andorra',
97
- # 'lang': 'en',
98
- # 'hash': '...'
99
- # }
100
- ```
101
-
102
- ## See Also
103
-
104
- - `cterdam/iso_3166-2`: Subdivisions with lang and hash
105
- - `cterdam/iata-metro`: IATA metro codes with lang and hash and coordinates
 
1
  ---
2
  tags:
3
+ - name
4
+ - lang
5
+ - hash
6
+ - iso-3166
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  ---
8
 
9
  # ISO 3166-1 Alpha-2 Codes with Lang and Hash
 
12
 
13
  ## Fields
14
 
15
+ - **code**: ISO 3166-1 alpha-2 country code
16
+ - **name**: Primary name in selected language (en, ru, or zh)
17
+ - **lang**: Language of primary name field
18
+ - **hash**: SHA256 hash of name field (64 hex chars)
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
+ For full documentation, see dataset README.md on HuggingFace Hub.