--- # For reference on model card metadata, see the spec: https://github.com/huggingface/hub-docs/blob/main/datasetcard.md?plain=1 # Doc / guide: https://huggingface.co/docs/hub/datasets-cards {} --- # Dataset Card for Dataset Name ## Dataset Description ### Dataset Summary This dataset consists of roughly 480k english (classified using nltk language classifier) lyrics with some more meta data. The id corresponds to the spotify id. The meta data was taken from the million playlist challenge @ AICrowd. The lyrics were crawled using "[song name] [artist name]" as string using the lyricsgenius python package which uses the genius.com search function. There is no guarantee that the lyrics are correct because the search is not perfect. And the data cleaning is not perfect: ### Data cleaning: The data was first verified by using fuzzy matching since the first strings of the retrieved lyrics were always the song name itself + "Lyrics" (e.g. "HelloLyrics"). When the song names in the API request and in the resulting payload don't match, it wasn't included in this set of lyrics. This was done using the package fuzzywuzzy partial_ratio() string matching with a score of under 60, because partial_ratio() is still helpful for variants of the song like "Remix" or "feat. x" and 60 was deemed a good number for some edge cases. One special edge case was manually removed which were "This is x" lyrics which were special lyrics pages describing an artist (if a song has "this is" in it, the check will fail). Next, the song is checked whether it contains one of the key words "instrument", "non-lyric", "effect", "musical", "ambient", "vocal" and whether it is less than 25 words. These songs are classified as instrumentals and are not included. Lastly, the following regex is applied: #### remove text inside [] brackets text = re.sub(\verb"[\(\{\[].*?[\)\]\}]", "", lyrics) #### remove punctuation (\p{L} is for different language characters) return " ".join(regex.findall(r\verb'[\\\p{L}a-zA-Z0-9]+', lyrics)) #### remove apostrophe and embed/you might also like token return re.sub(r\verb'([Ee]mbed)+$|(\')|(\")|(’)|(,)|([Yy]ou might also like)|([Ll]ike[Ee]mbed])', "", lyrics) ### Notes/Limitations: Some lyrics might not be fully english but have enough english to be classified as english using nltk language classifier. There is at least one outlier in length which shows the imperfect genius search. ### Genres: 49'985 rows have a list of genres, crawled from the official Spotify API. This list of genres are from the artist of the song since spotify doesn't provide genres for every individual song.