From c81bfcf51d5c3a91a45b88d052ee251cf3b2e3b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Mon, 3 Aug 2026 17:39:43 +0800 Subject: [PATCH] Restore official artist name spellings in the canonical table --- data/derived/artists.csv | 34 ++++++------- docs/decision_log.md | 7 +++ tools/src/pop_fem_audit_tools/build_db.py | 17 +++++++ tools/tests/test_build_db.py | 59 +++++++++++++++++++++++ 4 files changed, 100 insertions(+), 17 deletions(-) diff --git a/data/derived/artists.csv b/data/derived/artists.csv index b585e91..f6ac744 100644 --- a/data/derived/artists.csv +++ b/data/derived/artists.csv @@ -17,7 +17,7 @@ Adele,,,,,,Easy On Me (2022#4)|Hello (2016#7)|Oh My God (2022#72)|Send My Love ( AJR,,,,,,Bang! (2021#56) Alessia Cara,,,,,,1-800-273-8255 (2017#31/2018#84)|Here (2016#39)|Scars To Your Beautiful (2017#30)|Stay (2017#17) Alex Warren,,,,,,Ordinary (2025#7) -Amine,,,,,,Caroline (2017#60) +Aminé,,,,,,Caroline (2017#60) Anderson .Paak,,,,,,Leave The Door Open (2021#7)|Smokin Out The Window (2022#41) Andrew Choi,,,,,,Free (2025#92)|Soda Pop (2025#61)|Your Idol (2025#54) Anne-Marie,,,,,,Friends (2018#26)|Rockabye (2017#44) @@ -55,7 +55,7 @@ Blanco Brown,,,,,,Just The Way (2021#88)|The Git Up (2019#56) BlocBoy JB,,,,,,Look Alive (2018#23) Blueface,,,,,,Thotiana (2019#47) Bobby Helms,,,,,,Jingle Bell Rock (2022#86/2023#68/2024#68/2025#81) -Bomba Estereo,,,,,,Ojitos Lindos (2022#87) +Bomba Estéreo,,,,,,Ojitos Lindos (2022#87) Bradley Cooper,,,,,,Shallow (2019#19) Brandon Lake,,,,,,Hard Fought Hallelujah (2025#84) Brenda Lee,,,,,,Rockin' Around The Christmas Tree (2021#92/2022#80/2023#60/2024#59/2025#67) @@ -71,10 +71,10 @@ Calvin Harris,,,,,,Feels (2017#74)|One Kiss (2018#68)|Slide (2017#71)|This Is Wh Camila Cabello,,,,,,Bad Things (2017#41)|Bam Bam (2022#66)|Beautiful (2019#95)|Havana (2017#96/2018#4)|I Know What You Did Last Summer (2016#86)|My Oh My (2020#37)|Never Be The Same (2018#18)|Senorita (2019#15/2020#44) Cardi B,,,,,,Bartier Cardi (2018#61)|Be Careful (2018#59)|Bodak Yellow (Money Moves) (2017#24/2018#54)|Clout (2019#87)|Finesse (2018#14)|Girls Like You (2018#10/2019#22)|I Like It (2018#7/2019#69)|Money (2019#38)|MotorSport (2018#34)|No Limit (2018#30)|Please Me (2019#37)|Put It On Da Floor Again (2023#98)|Taki Taki (2019#57)|Tomorrow 2 (2023#70)|Up (2021#26)|WAP (2020#24) Carly Pearce,,,,,,I Hope You're Happy Now (2020#73) -Carolina Gaitan,,,,,,We Don't Talk About Bruno (2022#24) +Carolina Gaitán,,,,,,We Don't Talk About Bruno (2022#24) Carrie Underwood,,,,,,I'm Gonna Love You (2025#78)|If I Didn't Love You (2021#85)|The Fighter (2017#100) Cash Cobain,,,,,,Somebody Loves Me (2025#85) -Casper Magico,,,,,,Te Bote (2018#81) +Casper Mágico,,,,,,Te Bote (2018#81) Chance the Rapper,,,,,,Holy (2021#35)|I'm The One (2017#12)|No Brainer (2018#73) Chappell Roan,,,,,,"Good Luck, Babe! (2024#18/2025#31)|Hot To Go! (2024#53)|Pink Pony Club (2025#10)" Charlie Puth,,,,,,Attention (2017#22)|How Long (2018#65)|I Hope (2020#12/2021#40)|One Call Away (2016#43)|See You Again (2016#99)|We Don't Talk Anymore (2016#50) @@ -94,12 +94,12 @@ Coi Leray,,,,,,No More Parties (2021#79)|Players (2023#33) Coldplay,,,,,,Adventure Of A Lifetime (2016#95)|Hymn For The Weekend (2016#73)|Something Just Like This (2017#5) Cole Swindell,,,,,,Never Say Never (2022#92)|She Had Me At Heads Carolina (2022#46)|Single Saturday Night (2021#95) Corey Kent,,,,,,Wild As Her (2023#93) -Cris Mj,,,,,,Gata Only (2024#52) +Cris MJ,,,,,,Gata Only (2024#52) D.R.A.M.,,,,,,Broccoli (2016#34/2017#70) DaBaby,,,,,,Baby (2019#84)|Beat Box (2021#44)|BOP (2020#29)|Cash Shit (2019#90)|Cry Baby (2021#77)|For The Night (2020#49/2021#32)|My Oh My (2020#37)|Rockstar (2020#5)|Suge (2019#24)|Whats Poppin (2020#13) Daddy Yankee,,,,,,Con Calma (2019#65)|Despacito (2017#2)|Dura (2018#93) Daft Punk,,,,,,I Feel It Coming (2017#34)|Starboy (2016#58/2017#20) -Dan,,,,,,"10,000 Hours (2020#23)|All To Myself (2019#97)|Glad You Exist (2021#64)|Speechless (2019#35)|Tequila (2018#32/2019#91)" +Dan Smyers,,,,,,"10,000 Hours (2020#23)|All To Myself (2019#97)|Glad You Exist (2021#64)|Speechless (2019#35)|Tequila (2018#32/2019#91)" Daniel Caesar,,,,,,Peaches (2021#10) Danny Chung,,,,,,Soda Pop (2025#61)|Your Idol (2025#54) Darell,,,,,,Te Bote (2018#81) @@ -138,7 +138,7 @@ Eminem,,,,,,Godzilla (2020#62)|Houdini (2024#39) Encanto Cast,,,,,,We Don't Talk About Bruno (2022#24) Eric Church,,,,,,Does To Me (2020#93)|Hell Of A View (2021#91) ERNEST,,,,,,Cowgirls (2024#29)|Flower Shops (2022#96) -Eslabon Armado,,,,,,Ella Baila Sola (2023#26) +Eslabón Armado,,,,,,Ella Baila Sola (2023#26) Fat Joe,,,,,,All The Way Up (2016#87) Fetty Wap,,,,,,679 (2016#54)|All In My Head (Flex) (2016#93) Fifth Harmony,,,,,,All In My Head (Flex) (2016#93)|Work From Home (2016#16) @@ -197,7 +197,7 @@ Jeremih,,,,,,Oui (2016#55) Jessica Darrow,,,,,,Surface Pressure (2022#53) Jessie Murph,,,,,,Blue Strips (2025#52)|High Road (2024#81/2025#55)|Wild Ones (2024#36) Jhay Cortez,,,,,,Dakiti (2021#28) -Jhene Aiko,,,,,,P*$$y Fairy (OTW) (2020#94) +Jhené Aiko,,,,,,P*$$y Fairy (OTW) (2020#94) JID,,,,,,Enemy (2022#15) Jimin,,,,,,Who (2025#57) JNR CHOI,,,,,,To The Moon! (2022#97) @@ -278,7 +278,7 @@ Mae Muller,,,,,,Better Days (2022#73) Major Lazer,,,,,,Cold Water (2016#25)|Lean On (2016#85) Maren Morris,,,,,,Chasing After You (2021#61)|Circles Around This Town (2022#100)|The Bones (2020#9)|The Middle (2018#8) Mariah Carey,,,,,,All I Want For Christmas Is You (2020#67/2021#78/2022#65/2023#55/2024#54/2025#59) -Mariah The Scientist,,,,,,Burning Blue (2025#58) +Mariah the Scientist,,,,,,Burning Blue (2025#58) Marian Hill,,,,,,Down (2017#90) Maroon 5,,,,,,Beautiful Mistakes (2021#34)|Cold (2017#69)|Don't Wanna Know (2017#38)|Girls Like You (2018#10/2019#22)|Memories (2020#8)|Wait (2018#58)|What Lovers Do (2017#97/2018#89) Marshmello,,,,,,Come & Go (2020#54)|Friends (2018#26)|Happier (2018#80/2019#6)|Leave Before You Love Me (2021#63)|Miles On It (2024#34)|One Thing Right (2019#89)|Wolves (2018#60) @@ -312,7 +312,7 @@ NAV,,,,,,Lemonade (2021#51) Neckwav,,,,,,Soda Pop (2025#61)|Your Idol (2025#54) NEIKED,,,,,,Better Days (2022#73) Nelly,,,,,,Lil Bit (2021#70) -Neton Vega,,,,,,Loco (2025#100) +Netón Vega,,,,,,Loco (2025#100) NF,,,,,,Let You Down (2018#29) Niall Horan,,,,,,Slow Hands (2017#32) Nick Jonas,,,,,,Close (2016#66) @@ -320,7 +320,7 @@ Nicki Minaj,,,,,,Barbie World (2023#46)|Big Bank (2018#63)|Down In The DM (2016# Nicky Jam,,,,,,Te Bote (2018#81)|X (2018#90) Nicky Youre,,,,,,Sunroof (2022#29) Niko Moon,,,,,,Good Time (2021#84) -Nio Garcia,,,,,,Te Bote (2018#81) +Nio García,,,,,,Te Bote (2018#81) NLE Choppa,,,,,,Shotta Flow (2019#92)|Walk Em Down (2020#100) Noah Kahan,,,,,,Dial Drunk (2023#80)|Stick Season (2024#11) Normani,,,,,,Dancing With A Stranger (2019#14)|Love Lies (2018#19/2019#88) @@ -332,7 +332,6 @@ Olivia O'Brien,,,,,,I Hate U I Love U (2016#38) Olivia Rodrigo,,,,,,Deja Vu (2021#13)|Drivers License (2021#8)|Good 4 U (2021#5/2022#31)|Traitor (2021#38)|Vampire (2023#30/2024#57) One Direction,,,,,,Perfect (2016#100) OneRepublic,,,,,,I Ain't Worried (2022#37) -Oscar Maydon,,,,,,Tu Boda (2025#87) Ozuna,,,,,,Taki Taki (2019#57)|Te Bote (2018#81) P!nk,,,,,,Just Like Fire (2016#33)|One Too Many (2021#81)|Walk Me Home (2019#99)|What About Us (2017#84) Panic! At The Disco,,,,,,"Hey Look Ma, I Made It (2019#61)|High Hopes (2019#11)" @@ -391,10 +390,10 @@ Shaboozey,,,,,,A Bar Song (Tipsy) (2024#2/2025#3)|Good News (2025#23) SHAED,,,,,,Trampoline (2019#70/2020#53) Shakira,,,,,,"Bzrp Music Sessions, Vol. 53 (2023#96)|TQG (2023#65)" Shawn Mendes,,,,,,I Know What You Did Last Summer (2016#86)|If I Can't Have You (2019#29)|In My Blood (2018#46)|Mercy (2017#54)|Senorita (2019#15/2020#44)|Stitches (2016#23)|There's Nothing Holdin' Me Back (2017#23)|Treat You Better (2016#28/2017#92) -Shay,,,,,,"10,000 Hours (2020#23)|All To Myself (2019#97)|Glad You Exist (2021#64)|Speechless (2019#35)|Tequila (2018#32/2019#91)" +Shay Mooney,,,,,,"10,000 Hours (2020#23)|All To Myself (2019#97)|Glad You Exist (2021#64)|Speechless (2019#35)|Tequila (2018#32/2019#91)" Sheck Wes,,,,,,Mo Bamba (2019#49) Sia,,,,,,Cheap Thrills (2016#11) -Silento,,,,,,Watch Me (2016#88) +Silentó,,,,,,Watch Me (2016#88) Skip Marley,,,,,,Chained To The Rhythm (2017#73) Snow,,,,,,Con Calma (2019#65) Social House,,,,,,Boyfriend (2019#98) @@ -405,7 +404,7 @@ Stephanie Beatriz,,,,,,We Don't Talk About Bruno (2022#24) Stephen Sanchez,,,,,,Until I Found You (2023#50) Steve Lacy,,,,,,Bad Habit (2022#28/2023#39) Summer Walker,,,,,,Good Good (2024#79)|Heart Of A Woman (2025#94) -surf mesa,,,,,,ily (2020#95) +Surf Mesa,,,,,,ily (2020#95) Surfaces,,,,,,Sunday Best (2020#61) Swae Lee,,,,,,Be Like That (2020#88)|Close To Me (2019#58)|Sunflower (Spider-Man: Into The Spider-Verse) (2019#2)|Unforgettable (2017#15) SZA,,,,,,30 For 30 (2025#21)|All The Stars (2018#47)|BMF (2025#76)|Good Days (2021#52)|I Hate U (2022#50)|Kill Bill (2023#3)|Kiss Me More (2021#6/2022#90)|Love Galore (2017#80)|Luther (2025#2)|Nobody Gets Me (2023#77)|Rich Baby Daddy (2024#45)|Saturn (2024#19)|Shirt (2023#51)|Snooze (2023#9/2024#20)|What Lovers Do (2017#97/2018#89) @@ -417,7 +416,7 @@ Tems,,,,,,Essence (2021#60/2022#64)|Wait For U (2022#11/2023#83) Teo,,,,,,Rolex (2017#61) The Chainsmokers,,,,,,Closer (2016#10/2017#7)|Don't Let Me Down (2016#8)|Paris (2017#42)|Roses (2016#27)|Something Just Like This (2017#5) The Kid LAROI,,,,,,Stay (2021#12/2022#3)|Without You (2021#17) -The Marias,,,,,,No One Noticed (2025#32) +The Marías,,,,,,No One Noticed (2025#32) The Weeknd,,,,,,Blinding Lights (2020#1/2021#3)|Call Out My Name (2018#78)|Can't Feel My Face (2016#72)|Creepin' (2023#5)|Cry For Me (2025#73)|Die For You (2023#7)|Heartless (2020#28)|I Feel It Coming (2017#34)|In The Night (2016#61)|Low Life (2016#30)|One Right Now (2022#30)|Pray For Me (2018#40)|Rather Lie (2025#91)|Save Your Tears (2021#2/2022#40)|Starboy (2016#58/2017#20)|Take My Breath (2021#89)|The Hills (2016#32)|Timeless (2025#16)|You Right (2021#43/2022#45) Thomas Rhett,,,,,,After All The Bars Are Closed (2025#88)|Die A Happy Man (2016#64)|Look What God Gave Her (2019#85)|Marry Me (2018#76)|What's Your Country Song (2021#80) Tim McGraw,,,,,,Humble And Kind (2016#96) @@ -437,7 +436,7 @@ Tyler Cole,,,,,,Meet Me At Our Spot (2022#74) Tyler Hubbard,,,,,,5 Foot 9 (2022#67)|Dancin' In The Country (2023#61) "Tyler, The Creator",,,,,,Like Him (2025#62)|Sticky (2025#41) Usher,,,,,,Good Good (2024#79)|No Limit (2016#90) -Victoria Monet,,,,,,On My Mama (2024#91) +Victoria Monét,,,,,,On My Mama (2024#91) Walker Hayes,,,,,,AA (2022#61)|Fancy Like (2021#27/2022#35) Warren Zeiders,,,,,,Pretty Little Poison (2024#60) Wham!,,,,,,Last Christmas (2023#84/2024#74/2025#65) @@ -468,3 +467,4 @@ Zay Hilfigerrr,,,,,,Juju On That Beat (TZ Anthem) (2017#63) Zayion McCall,,,,,,Juju On That Beat (TZ Anthem) (2017#63) Zayn,,,,,,I Don't Wanna Live Forever (Fifty Shades Darker) (2017#26)|Pillowtalk (2016#22) Zedd,,,,,,Starving (2016#94/2017#82)|Stay (2017#17)|The Middle (2018#8) +Óscar Maydon,,,,,,Tu Boda (2025#87) diff --git a/docs/decision_log.md b/docs/decision_log.md index 6e2da5b..07d71c7 100644 --- a/docs/decision_log.md +++ b/docs/decision_log.md @@ -148,6 +148,13 @@ commit」的第二例外。報表不含資料庫 ID(內部參照,資料 改版會重排,不供引用);關係以內嵌字串呈現——`/` 連同 一首歌的多次上榜、`|` 連不同歌曲——欄位一律字母序。 +- **歌手正名表全面改存官方拼法**:變音符號一律恢復 + (Billboard 印法慣性去符號,共 12 筆,如 Aminé、Jhené + Aiko、Silentó);二人組拆名改存成員全名(Dan Smyers、 + Shay Mooney);官方大小寫 3 筆(Cris MJ、Mariah the + Scientist、Surf Mesa)。官方拼法逐筆以 DSP 官方頁查證 + (維基百科/Wikidata 的大小寫是其自家規範,不作準); + 查證亦確認 Tones And I 的 chart 印法即官方寫法,不改。 - **先補完 Wikidata、再捕捉快照**:歌手資料查證做在上游—— 以 subagent(`artist-wikidata-updater` 定義檔)逐位查證 快照欄位(P21、P31、P136、P27/P495,新條目加 P106)並 diff --git a/tools/src/pop_fem_audit_tools/build_db.py b/tools/src/pop_fem_audit_tools/build_db.py index c697140..b546ba0 100644 --- a/tools/src/pop_fem_audit_tools/build_db.py +++ b/tools/src/pop_fem_audit_tools/build_db.py @@ -140,6 +140,23 @@ CANONICAL_ARTIST_NAMES: dict[str, str] = { "mo": "MØ", "wizkid": "Wizkid", "ye": "Kanye West", + "amine": "Aminé", + "bomba estereo": "Bomba Estéreo", + "carolina gaitan": "Carolina Gaitán", + "casper magico": "Casper Mágico", + "eslabon armado": "Eslabón Armado", + "jhene aiko": "Jhené Aiko", + "neton vega": "Netón Vega", + "nio garcia": "Nio García", + "oscar maydon": "Óscar Maydon", + "silento": "Silentó", + "the marias": "The Marías", + "victoria monet": "Victoria Monét", + "dan": "Dan Smyers", + "shay": "Shay Mooney", + "cris mj": "Cris MJ", + "mariah the scientist": "Mariah the Scientist", + "surf mesa": "Surf Mesa", } """The canonical artist spellings, keyed by the case-folded identity.""" diff --git a/tools/tests/test_build_db.py b/tools/tests/test_build_db.py index 3db5695..7e2fb56 100644 --- a/tools/tests/test_build_db.py +++ b/tools/tests/test_build_db.py @@ -463,6 +463,65 @@ class TestBuildDB(unittest.TestCase): {y.song for y in artists[0].song_artists}}, {"Song One", "Song Two"}) + def test_canonical_silento_restores_diacritic(self) -> None: + """Test that a "Silento" credit stores the diacritic- + restored canonical spelling "Silentó".""" + self.__write_chart( + "year,rank,title,artist\n" + "2016,1,Watch Me,Silento\n" + "2016,2,filler,Filler Artist\n" + "2017,1,filler2,Filler Artist Two\n" + "2017,2,filler3,Filler Artist Three\n") + status: int + stderr: str + status, stderr = self.__run_build() + self.assertEqual(status, 0) + session: Session = self.__session() + artist: Artist | None = session.scalar( + sa.select(Artist).where(Artist.name.ilike("silent%"))) + assert artist is not None + self.assertEqual(artist.name, "Silentó") + + def test_canonical_dan_and_shay_full_names(self) -> None: + """Test that a "Dan + Shay" credit stores the canonical + full names "Dan Smyers" and "Shay Mooney".""" + self.__write_chart( + "year,rank,title,artist\n" + "2016,1,Tequila,Dan + Shay\n" + "2016,2,filler,Filler Artist\n" + "2017,1,filler2,Filler Artist Two\n" + "2017,2,filler3,Filler Artist Three\n") + status: int + stderr: str + status, stderr = self.__run_build() + self.assertEqual(status, 0) + session: Session = self.__session() + song: Song | None = session.scalar( + sa.select(Song).where(Song.title == "Tequila")) + assert song is not None + self.assertEqual( + [x.artist.name for x in song.song_artists], + ["Dan Smyers", "Shay Mooney"]) + + def test_canonical_surf_mesa_case_restored(self) -> None: + """Test that a "surf mesa" credit stores the canonical + case styling "Surf Mesa".""" + self.__write_chart( + "year,rank,title,artist\n" + "2016,1,Ily,surf mesa\n" + "2016,2,filler,Filler Artist\n" + "2017,1,filler2,Filler Artist Two\n" + "2017,2,filler3,Filler Artist Three\n") + status: int + stderr: str + status, stderr = self.__run_build() + self.assertEqual(status, 0) + session: Session = self.__session() + artist: Artist | None = session.scalar( + sa.select(Artist).where(Artist.name.ilike("surf%"))) + assert artist is not None + self.assertEqual(artist.name, "Surf Mesa") + def test_first_run_on_fresh_store(self) -> None: """Test that a build on a fresh store creates the tables.""" self.assertFalse((self.__dir / "store.sqlite3").exists())