Jarbas commited on
Commit
deb9f69
·
verified ·
1 Parent(s): a8f9c08

docs: update README with confidence-scored matching stats and hard-reject methodology

Browse files
Files changed (1) hide show
  1. README.md +74 -157
README.md CHANGED
@@ -4,117 +4,14 @@ tags:
4
  - music
5
  - artists
6
  - metadata
7
- configs:
8
- - config_name: default
9
- data_files:
10
- - split: train
11
- path: data/train-*
12
- dataset_info:
13
- features:
14
- - name: mb_id
15
- dtype: string
16
- - name: adb_id
17
- dtype: string
18
- - name: ma_id
19
- dtype: int64
20
- - name: progarchives_id
21
- dtype: int64
22
- - name: jazz_id
23
- dtype: string
24
- - name: classical_id
25
- dtype: int64
26
- - name: bandcamp_id
27
- dtype: 'null'
28
- - name: soundcloud_id
29
- dtype: 'null'
30
- - name: soundcloud_username
31
- dtype: 'null'
32
- - name: youtube_channel_id
33
- dtype: 'null'
34
- - name: sources
35
- list: string
36
- - name: name
37
- dtype: string
38
- - name: sort_name
39
- dtype: string
40
- - name: type
41
- dtype: string
42
- - name: gender
43
- dtype: string
44
- - name: disambiguation
45
- dtype: string
46
- - name: ended
47
- dtype: bool
48
- - name: aliases
49
- list: string
50
- - name: country
51
- dtype: string
52
- - name: area
53
- dtype: string
54
- - name: begin_date
55
- dtype: string
56
- - name: end_date
57
- dtype: string
58
- - name: tags
59
- list: string
60
- - name: style
61
- dtype: string
62
- - name: mood
63
- dtype: string
64
- - name: classical_period
65
- dtype: string
66
- - name: biography_en
67
- dtype: string
68
- - name: members
69
- dtype: string
70
- - name: ipi_codes
71
- list: string
72
- - name: isni_codes
73
- list: string
74
- - name: website
75
- dtype: string
76
- - name: social
77
- struct:
78
- - name: twitter
79
- dtype: string
80
- - name: facebook
81
- dtype: string
82
- - name: images
83
- struct:
84
- - name: logo_url
85
- dtype: string
86
- - name: thumb_url
87
- dtype: string
88
- - name: fanart_url
89
- dtype: string
90
- - name: banner_url
91
- dtype: string
92
- - name: urls
93
- struct:
94
- - name: musicbrainz
95
- dtype: string
96
- - name: audiodb
97
- dtype: string
98
- - name: classical
99
- dtype: string
100
- - name: progarchives
101
- dtype: string
102
- - name: jazz
103
- dtype: string
104
- - name: metal_archives
105
- dtype: string
106
- splits:
107
- - name: train
108
- num_bytes: 599351174
109
- num_examples: 1662320
110
- download_size: 294856274
111
- dataset_size: 599351174
112
  ---
113
 
114
  # Unified Music Artists
115
 
116
  Cross-database artist dataset unifying **MusicBrainz**, **TheAudioDB**, **Metal Archives**, **ProgArchives**, **Jazz**, **Classical Composers**, **Bandcamp**, **SoundCloud**, and **YouTube Music** into one row per artist with flat canonical ID columns.
117
 
 
 
118
  ## Canonical ID columns
119
 
120
  All nullable — present only when the artist was found in that database:
@@ -134,78 +31,95 @@ All nullable — present only when the artist was found in that database:
134
 
135
  ## Coverage
136
 
137
- **1,639,519 total rows** full outer union across all sources. Rows with no MusicBrainz entry are included if present in any other source.
138
-
139
- | Source | Rows contributed |
140
- |--------|-----------------|
141
- | MusicBrainz | 1,520,428 (primary) |
142
- | Metal Archives | 139,704 |
143
- | ProgArchives | 19,367 |
144
- | Classical Composers DB | 17,159 |
145
- | SoundCloud | 16,884 |
146
- | TheAudioDB | 22,387 |
147
- | YouTube Music | 23,861 |
148
- | Bandcamp | 11,759 |
149
- | Jazz DB | 10,941 |
150
-
151
- 109,190 rows (6.7%) have data from more than one source.
152
 
153
  ## Methodology
154
 
155
  ### Source priority
156
 
157
- **MusicBrainz** is the primary source — it has the most complete structured data (aliases, IPI/ISNI codes, begin/end dates, relationships, tags) and is the most authoritative music database. All other sources are joined against MusicBrainz rows first; unmatched rows from each secondary source are appended as orphan rows (full outer union).
158
 
159
- ### Deduplication and cross-database matching
160
 
161
  #### Hard links — MusicBrainz ID
162
- **TheAudioDB** stores the MusicBrainz ID directly (`mb_id` field). This is a database-level assertion — when present, it is used as the sole join key with no name comparison.
 
163
 
164
  #### Platform ID mapping via Wikidata SPARQL
165
- A single Wikidata SPARQL query retrieves all items with a MusicBrainz artist ID (P434) cross-referenced to any of Bandcamp (P3283), SoundCloud (P3040), or YouTube channel ID (P2397). This yields ~53,000 MB→platform mappings in one request, avoiding per-artist API calls across 1.5M rows.
166
-
167
- ```sparql
168
- SELECT DISTINCT ?mbid ?bandcamp ?soundcloud ?youtube WHERE {
169
- ?item wdt:P434 ?mbid.
170
- OPTIONAL { ?item wdt:P3283 ?bandcamp. }
171
- OPTIONAL { ?item wdt:P3040 ?soundcloud. }
172
- OPTIONAL { ?item wdt:P2397 ?youtube. }
173
- FILTER(BOUND(?bandcamp) || BOUND(?soundcloud) || BOUND(?youtube))
174
- }
175
- ```
176
 
177
- Platform profiles (Bandcamp artist pages, SoundCloud user profiles) are then scraped using the mapped slugs/usernames to enrich with images, location, and follower data.
178
 
179
- #### Soft matching — norm(name) + country
180
- For **Metal Archives**, **ProgArchives**, **Jazz**, and **Classical** sources (which do not store MusicBrainz IDs), rows are matched to MusicBrainz entries by:
181
- 1. `norm(name)` exact match — Unicode-normalised, lowercased, punctuation stripped, leading "the " removed
182
- 2. **Plus** same `country` / `area` field
183
 
184
- Name alone is used as a fallback only when no other source has matched the same name+country combination, to reduce false positives for common band names.
185
 
186
- #### Special-purpose exclusions
187
- The following MusicBrainz placeholder entries are excluded from the dataset:
188
- - Names matching `[unknown]`, `[no artist]`, `Various Artists`
189
- - Any name in bracket notation (`[data]`, `[anonymous]`, `[traditional]`, etc.)
190
- - Entries with disambiguation containing "special purpose artist" or "language instruction"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
 
192
- ### Platform ID enrichment
193
 
194
- Beyond Wikidata, Bandcamp and SoundCloud profiles are scraped directly using the mapped slugs to add:
195
- - **Bandcamp**: `bandcamp_id` (subdomain slug), `location`, `genre`, `tags`, artist image
196
- - **SoundCloud**: `soundcloud_id` (numeric), `soundcloud_username` (permalink), artist image
197
 
198
- The enrichment pass is idempotent re-running after scrapers complete additional profiles adds new data without touching already-enriched rows.
199
 
200
- ## Field normalisation
 
 
 
 
 
 
 
 
 
 
 
 
 
201
 
202
  | Field | Notes |
203
  |-------|-------|
204
- | `mb_id`, `adb_id`, etc. | Flat top-level columns (not nested `ids` dict) |
205
  | `sources` | List of database names that contributed to this row |
206
- | `tags` / `genres` | Lists, deduplicated across sources |
207
- | `begin_date` / `end_date` | ISO date strings where available |
 
208
  | `ended` | Boolean — true if the artist/group has dissolved |
 
 
 
 
 
209
 
210
  ## Usage
211
 
@@ -214,12 +128,15 @@ from datasets import load_dataset
214
 
215
  ds = load_dataset("TigreGotico/media-metadata-artists", split="train")
216
 
217
- # Artists with Bandcamp pages
218
- bc = ds.filter(lambda r: r["bandcamp_id"] is not None)
219
 
220
  # Metal bands with both MB and MA IDs
221
  metal = ds.filter(lambda r: r["mb_id"] and r["ma_id"])
222
 
223
- # Artists on all three platforms
 
 
 
224
  triple = ds.filter(lambda r: r["bandcamp_id"] and r["soundcloud_username"] and r["youtube_channel_id"])
225
  ```
 
4
  - music
5
  - artists
6
  - metadata
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  ---
8
 
9
  # Unified Music Artists
10
 
11
  Cross-database artist dataset unifying **MusicBrainz**, **TheAudioDB**, **Metal Archives**, **ProgArchives**, **Jazz**, **Classical Composers**, **Bandcamp**, **SoundCloud**, and **YouTube Music** into one row per artist with flat canonical ID columns.
12
 
13
+ **1,662,320 total rows** — full outer union across all sources.
14
+
15
  ## Canonical ID columns
16
 
17
  All nullable — present only when the artist was found in that database:
 
31
 
32
  ## Coverage
33
 
34
+ | Source | Matched to MB | Unmatched (orphan rows) | Total contributed |
35
+ |--------|--------------|------------------------|-------------------|
36
+ | MusicBrainz | 1,520,428 (primary) | — | 1,520,428 |
37
+ | Metal Archives | 16,391 (medium) | +114,751 | 131,142 |
38
+ | Classical Composers DB | 4,135 (medium) | +11,527 | 15,662 |
39
+ | ProgArchives | 4,762 (medium) | +5,681 | 10,443 |
40
+ | Jazz DB | 317 (medium) | +7,642 | 7,959 |
41
+ | TheAudioDB | 10,007 (hard) + 858 (medium) | +2,291 | 13,156 |
 
 
 
 
 
 
 
42
 
43
  ## Methodology
44
 
45
  ### Source priority
46
 
47
+ **MusicBrainz** is the primary source — it has the most complete structured data (aliases, IPI/ISNI codes, begin/end dates, relationships, tags). All other sources are joined against MusicBrainz rows first; unmatched rows from each secondary source are appended as orphan rows (full outer union).
48
 
49
+ ### Cross-database matching
50
 
51
  #### Hard links — MusicBrainz ID
52
+
53
+ **TheAudioDB** stores the MusicBrainz UUID directly. When present, it is the sole join key — no name comparison needed. **10,007** artists matched this way.
54
 
55
  #### Platform ID mapping via Wikidata SPARQL
 
 
 
 
 
 
 
 
 
 
 
56
 
57
+ A single Wikidata SPARQL query retrieves all items with a MusicBrainz artist ID (P434) cross-referenced to Bandcamp (P3283), SoundCloud (P3040), or YouTube channel ID (P2397), yielding ~53,000 MB→platform mappings in one request.
58
 
59
+ #### Confidence-scored soft matching
 
 
 
60
 
61
+ For Metal Archives, ProgArchives, Jazz, and Classical sources (which do not store MusicBrainz IDs), rows are matched using a three-tier system:
62
 
63
+ **Medium confidence** (corroborated) — name exact match **plus** at least one of:
64
+ - Same ISO 3166-1 alpha-2 country (all sources normalised to alpha-2 before comparison)
65
+ - `begin_date` / `formed_year` / `birth` within 2 years of MB `begin_date`
66
+ - MB alias list contains the candidate's normalised name
67
+
68
+ **Rejected** (name matched but hard-rejected by a signal):
69
+
70
+ | Hard-reject rule | Rationale |
71
+ |-----------------|-----------|
72
+ | Begin/birth year diff > 2 years | Different entity with same name |
73
+ | Candidate end_year predates MB begin_year | Dissolved before the other was founded |
74
+ | Genre-family clash: classical ↔ metal, classical ↔ jazz | Implausible same entity |
75
+ | MB `type=Person`, candidate has `members > 1` | Solo artist matched to a group |
76
+
77
+ Name-only matches (no corroborating signal) are **never accepted**.
78
+
79
+ #### Hard-reject counts (name matched, rejected by signals)
80
+
81
+ | Source | Rejected name-only matches |
82
+ |--------|---------------------------|
83
+ | Metal Archives | 21,079 |
84
+ | ProgArchives | 11,133 |
85
+ | TheAudioDB | 9,637 |
86
+ | Jazz DB | 7,520 |
87
+ | Classical | 4,669 |
88
+ | **Total** | **54,038** |
89
 
90
+ These 54,038 name collisions would have been false-positive merges under naive name+country matching. Common band names ("Chaos", "Oblivion", "Inferno", "Phoenix") appear dozens of times across countries and eras — year and genre signals correctly separate them.
91
 
92
+ #### Country normalisation
 
 
93
 
94
+ All sources use different country formats. Everything is normalised to ISO 3166-1 alpha-2 before comparison:
95
 
96
+ - Classical uses alpha-3 (`ITA`→`IT`, `DEU`→`DE`, `GBR`→`GB`, `ENG`→`GB`, `RUS`→`RU`)
97
+ - ProgArchives uses full names (`Italy`→`IT`, `United Kingdom`→`GB`)
98
+ - MusicBrainz and TheAudioDB already use alpha-2
99
+
100
+ The `country` field in the output is always alpha-2 (or null).
101
+
102
+ #### Special-purpose exclusions
103
+
104
+ Excluded from the dataset:
105
+ - `[unknown]`, `[no artist]`, `Various Artists`
106
+ - Any name in bracket notation (`[data]`, `[anonymous]`, `[traditional]`, etc.)
107
+ - Disambiguation containing `"special purpose artist"` or `"language instruction"`
108
+
109
+ ## Field reference
110
 
111
  | Field | Notes |
112
  |-------|-------|
 
113
  | `sources` | List of database names that contributed to this row |
114
+ | `type` | Person / Group / Orchestra / Choir (from MB) |
115
+ | `country` | ISO 3166-1 alpha-2 |
116
+ | `begin_date` / `end_date` | ISO date strings |
117
  | `ended` | Boolean — true if the artist/group has dissolved |
118
+ | `tags` | Genre/style tags from MusicBrainz |
119
+ | `genres` / `themes` | Metal Archives genre and lyrical theme strings |
120
+ | `prog_genre` / `jazz_genre` / `classical_period` | Source-specific genre fields |
121
+ | `ipi_codes` / `isni_codes` | Music industry identifiers (MB only) |
122
+ | `aliases` | All known alternate names (MB) |
123
 
124
  ## Usage
125
 
 
128
 
129
  ds = load_dataset("TigreGotico/media-metadata-artists", split="train")
130
 
131
+ # Classical composers with MB IDs
132
+ composers = ds.filter(lambda r: r["classical_id"] is not None and r["mb_id"] is not None)
133
 
134
  # Metal bands with both MB and MA IDs
135
  metal = ds.filter(lambda r: r["mb_id"] and r["ma_id"])
136
 
137
+ # Artists with Bandcamp pages
138
+ bc = ds.filter(lambda r: r["bandcamp_id"] is not None)
139
+
140
+ # Artists on all three streaming platforms
141
  triple = ds.filter(lambda r: r["bandcamp_id"] and r["soundcloud_username"] and r["youtube_channel_id"])
142
  ```